--Autor Lechu & Aranea--

Ursus904 = {};

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

function Ursus904:load(xmlFile)
end;

function Ursus904:delete()
end;

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

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

function Ursus904:update(dt)
	if self.isMotorStarted and self.isEntered then
		if self.motor.speedLevel == 4 then
			self:setAnimationTime(8,self.animationParts[8].animDuration);
			self.two = false;
			self.three = false;
			self.one = false;
			self.sound = true;
		else
			self:setAnimationTime(8,self.animationParts[8].offSet);
			self.sound = false;
		end;
		if self.motor.speedLevel == 3 or Input.isKeyPressed(Input.KEY_w) then
			self:setAnimationTime(7,self.animationParts[7].animDuration);
			self.two = false;
			self.one = false;
			self.four = false;
			self.sound3 = true;
		else
			self:setAnimationTime(7,self.animationParts[7].offSet);
			self.sound3 = false;
		end;
		if self.motor.speedLevel == 2 then
			self:setAnimationTime(6,self.animationParts[6].animDuration);
			self.one = false;
			self.three = false;
			self.four = false;
			self.sound4 = true;
		else
			self:setAnimationTime(6,self.animationParts[6].offSet);
			self.sound4 = false;
		end;
		if self.motor.speedLevel == 1 or Input.isKeyPressed(Input.KEY_s) then
			self:setAnimationTime(5,self.animationParts[5].animDuration);
			self.two = false;
			self.three = false;
			self.four = false;
			self.sound6 = true;
		else
			self:setAnimationTime(5,self.animationParts[5].offSet);
			self.sound6 = false;
		end;
	end;
	 if self.isEntered then                                     
                if Input.isKeyPressed(Input.KEY_s) then
                   self:setAnimationTime(9, self.animationParts[9].currentPosition+(self.animationParts[9].offSet+dt), false);
                   self.sound2 = true;
                   self.sound5 = 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(9, self.animationParts[9].currentPosition-(self.animationParts[9].offSet+dt), false);
                   self.sound2 = false;
                   self.sound5 = true;
				   end;
				   
end;
function Ursus904:updateTick(dt)
end;

function Ursus904:draw()
end;
end;