--Autor Lechu & Aranea--

Animacja = {};

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

function Animacja:load(xmlFile)
end;

function Animacja:delete()
end;

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

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

function Animacja: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;
if self.isEntered then				
		if InputBinding.hasEvent(InputBinding.szybaL) then
			if self.animationParts[10].clipEndTime then
				self:setAnimationTime(10, self.animationParts[10].offSet);
			elseif self.animationParts[10].clipStartTime then
				self:setAnimationTime(10, self.animationParts[10].animDuration);
			end;
		end;
	end;
	 if self.isEntered then				
		if InputBinding.hasEvent(InputBinding.szybaP) then
			if self.animationParts[11].clipEndTime then
				self:setAnimationTime(11, self.animationParts[11].offSet);
			elseif self.animationParts[11].clipStartTime then
				self:setAnimationTime(11, self.animationParts[11].animDuration);
			end;
		end;
	end;			
function Animacja:updateTick(dt)
end;

function Animacja:draw()
end;
end;