
-- Drumroto
--@date 10/09/09

Drumroto= {};

function Drumroto.prerequisitesPresent(specializations)
    return true;
end;

function Drumroto:load(xmlFile)
	
    


	self.unloadingDrum1 = Utils.indexToObject(self.rootNode, getXMLString(xmlFile, "vehicle.unloadingDrum#index"));
                    self.unloadingDrum2 = Utils.indexToObject(self.rootNode, getXMLString(xmlFile, "vehicle.unloadingDrum#index1"));
	
	self.unloadingDrumScale = Utils.getNoNil(getXMLFloat(xmlFile, "vehicle.unloadingDrum#scale"), 2);
	        
	
	self.isDrumActivated = false;     
end;

function Drumroto:delete()    
end;

function Drumroto:mouseEvent(posX, posY, isDown, isUp, button)    
end;

function Drumroto:keyEvent(unicode, sym, modifier, isDown)
    
    if isDown then
		
		if sym == Input.KEY_x then
			self.isDrumActivated = not self.isDrumActivated;
		end;		
	end;	 
end;


function Drumroto:update(dt)

	if self:getIsActive() then		
		
		
		if self.isDrumActivated then
			rotate(self.unloadingDrum1, 0  * dt * self.unloadingDrumScale, 0,80);
			rotate(self.unloadingDrum2, 0  * dt * self.unloadingDrumScale, 0,80);
			
		end;		
	end;
end;

function Drumroto:draw()	
end;





















