--
--


HayBase = {};




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

function HayBase:load(xmlFile)
	
	self.hayBase = {};
	self.hayBase.node = Utils.indexToObject(self.components, getXMLString(xmlFile, "vehicle.hayBase#index"));
	self.hayBase.unloadingSpeed = Utils.getNoNil(getXMLFloat(xmlFile, "vehicle.hayBase#unloadingSpeed"), 0.001);
	self.hayBase.unloadingDirection = Utils.getNoNil(getXMLInt(xmlFile, "vehicle.hayBase#unloadingDirection"), 1);
	setShaderParameter(self.hayBase.node, "movingDirection", 0,0,0,0,false);

end;

function HayBase:delete()
end;

function HayBase:readStream(streamId, connection)
end;

function HayBase:writeStream(streamId, connection)
end;

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

function HayBase:keyEvent(unicode, sym, modifier, isDown)
end;

function HayBase:update(dt)
	
end;


function HayBase:updateTick(dt)	
end;

function HayBase:draw()	

end;

function HayBase:onAttach(attacherVehicle)

end;

function HayBase:onDetach()

end;

function HayBase:onLeave()

end;

function HayBase:onDeactivate()
    HayBase.onDeactivateSounds(self);
	setShaderParameter(self.hayBase.node, "movingDirection", 0,0,0,0,false);
end;


function HayBase:onDeactivateSounds()

end;

function HayBase:onStartTip(currentTipTrigger, noEventSend)
	setShaderParameter(self.hayBase.node, "movingDirection", self.hayBase.unloadingDirection*self.hayBase.unloadingSpeed,0,0,0,false);
end;

function HayBase:onEndTip(noEventSend)
	setShaderParameter(self.hayBase.node, "movingDirection", 0,0,0,0,false);
end;

