--Autor Lechu & Aranea--

Marce = {};

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

function Marce:load(xmlFile)

end;

function Marce:draw()
end;

function Marce:delete()
end;

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

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

function Marce:update(dt)
	
if self.isEntered then                   
     
	
	if self.isMotorStarted and self.isEntered then
		if self.motor.speedLevel == 3 or Input.isKeyPressed(Input.KEY_w) then
			self:setAnimationTime(4,self.animationParts[4].animDuration);
			self.two = false;
			self.three = false;
			self.one = false;
		
		else
			self:setAnimationTime(4,self.animationParts[4].offSet);
			
		end;
		if self.motor.speedLevel == 4  then
			self:setAnimationTime(3,self.animationParts[3].animDuration);
			self.two = false;
			self.one = false;
			self.four = false;
		
		else
			self:setAnimationTime(3,self.animationParts[3].offSet);
			
		end;
		if self.motor.speedLevel == 2 then
			self:setAnimationTime(2,self.animationParts[2].animDuration);
			self.one = false;
			self.three = false;
			self.four = false;
			
		else
			self:setAnimationTime(2,self.animationParts[2].offSet);
			
		end;
		if self.motor.speedLevel == 1 or Input.isKeyPressed(Input.KEY_s) then
			self:setAnimationTime(1,self.animationParts[1].animDuration);
			self.two = false;
			self.three = false;
			self.four = false;
	
		else
			self:setAnimationTime(1,self.animationParts[1].offSet);
			
		end;
	end;
	 if self.isEntered then                                     
                if Input.isKeyPressed(Input.KEY_s) then
                   self:setAnimationTime(5, self.animationParts[5].currentPosition+(self.animationParts[5].offSet+dt), false);
                  
                   
        elseif 
                   Input.isKeyPressed(Input.KEY_w) or self.motor.speedLevel == 1 or self.motor.speedLevel == 2 or self.motor.speedLevel == 3 or self.motor.speedLevel == 4 then
           self:setAnimationTime(5, self.animationParts[5].currentPosition-(self.animationParts[5].offSet+dt), false);
                   
                 
				   end;
				   
end;
end;	
end;		
function Marce:updateTick(dt)
end;