--
-- @Authors of original scripts used: Manuel Leithner (SFM-Modding),Modelleicher (www.schwabenmodding.bplaced.net),Templaer, JoXXer, Knagsted, Mofa-Killer, Face, Heady, other do not remember!!
-- Upraveno tým AgroSketch pro použití v John Deere 8R a 7R

StartAnim = {};
function StartAnim.prerequisitesPresent(specializations)
    return SpecializationUtil.hasSpecialization(Motorized, specializations);
end;
function StartAnim:load(xmlFile)
	---------------------Zobrazeni po startu---------------------
	self.StartAnim = {};
	self.StartAnim.RPM = Utils.indexToObject(self.components, getXMLString(xmlFile, "vehicle.StartAnim#RPM"));
	self.StartAnim.SPEED = Utils.indexToObject(self.components, getXMLString(xmlFile, "vehicle.StartAnim#SPEED"));
	self.StartAnim.WORKHOURS = Utils.indexToObject(self.components, getXMLString(xmlFile, "vehicle.StartAnim#WORKHOURS"));
	self.StartAnim.Monitor1 = Utils.indexToObject(self.components, getXMLString(xmlFile, "vehicle.StartAnim#Monitor1"));
	self.StartAnim.Monitor2 = Utils.indexToObject(self.components, getXMLString(xmlFile, "vehicle.StartAnim#Monitor2"));
	self.StartAnim.panel = Utils.indexToObject(self.components, getXMLString(xmlFile, "vehicle.StartAnim#panel"));
end;
function StartAnim:delete()

end;
function StartAnim:readStream(streamId, connection)
end;
function StartAnim:writeStream(streamId, connection)
end;
function StartAnim:readUpdateStream(streamId, timestamp, connection)
	if connection:getIsServer() then
		if streamReadBool(streamId) then
		end;
	end;
end;
function StartAnim:writeUpdateStream(streamId, connection, dirtyMask)
	if not connection:getIsServer() then
		if streamWriteBool(streamId, bitAND(dirtyMask, self.vehicleDirtyFlag) ~= 0) then
        end;
    end;
end;
function StartAnim:mouseEvent(posX, posY, isDown, isUp, button)
end;


function StartAnim:keyEvent(unicode, sym, modifier, isDown)
end;
function StartAnim:update(dt)
end;

function StartAnim:updateTick(dt)
	---------------------Zobrazeni po startu---------------------
    if self:getIsActive() then
		if self.isMotorStarted then
			setVisibility( self.StartAnim.RPM, true );
			setVisibility( self.StartAnim.SPEED, true );
			setVisibility( self.StartAnim.WORKHOURS, true );
			setVisibility( self.StartAnim.Monitor1, true );
			setVisibility( self.StartAnim.Monitor2, true );
			setVisibility( self.StartAnim.panel, true );
		else
			setVisibility( self.StartAnim.RPM, false );
			setVisibility( self.StartAnim.SPEED, false );
			setVisibility( self.StartAnim.WORKHOURS, false );
			setVisibility( self.StartAnim.Monitor1, false );
			setVisibility( self.StartAnim.Monitor2, false );
			setVisibility( self.StartAnim.panel, false );
		end;
	end;
end;
function StartAnim:draw()
end;
