--
-- 
-- 
-- 

playanim = {};

function playanim.prerequisitesPresent(specializations)
    return SpecializationUtil.hasSpecialization(Trailer, specializations);
end;

function playanim:load(xmlFile)

end;

function playanim:delete()
end;

function playanim:readStream(streamId, connection)
end;

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

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

function playanim:update(dt)
    if self:getIsActiveForInput() then
        if InputBinding.hasEvent(InputBinding.playanim_TurnOn) then
            self:setIsTurnedOn(not self.isTurnedOn);
        end;
		if InputBinding.isPressed(InputBinding.playanim_PipeDown) and self:getIsActiveForInput() then
			self:setAnimationTime(1, self.animationParts[1].currentPosition+(self.animationParts[1].offSet+dt), false);
		elseif InputBinding.isPressed(InputBinding.playanim_PipeUp) and self:getIsActiveForInput() then
			self:setAnimationTime(1, self.animationParts[1].currentPosition-(self.animationParts[1].offSet+dt), false);
		end;
    end;
end;

function playanim:updateTick(dt)

end;

function playanim:draw()
end;

function playanim:onLeave()
	
end;