animation = {};

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


function animation:load(xmlFile)
self.charIdA1 = Utils.indexToObject(self.rootNode, getXMLString(xmlFile, "vehicle.anim1#index"));
self.clipIndexA1 = getXMLString(xmlFile, "vehicle.anim1#animationClip");

self.something = 0;

self.showhelp = false;
end;

function animation:update(dt)
if self.isMotorStarted and self:getIsActiveForInput() and self.isEntered and InputBinding.hasEvent(InputBinding.Animation) then
self.something = self.something +1
end;

if self.something == 0 then
local charIdA1 = getAnimCharacterSet(self.charIdA1);
local clipIndexA1 = getAnimClipIndex(charIdA1, self.clipIndexA1);

assignAnimTrackClip(charIdA1, 0, clipIndexA1);
setAnimTrackLoopState(charIdA1, 0, false);
setAnimTrackSpeedScale(charIdA1, 0, 1);
enableAnimTrack(charIdA1, 0);

if getAnimTrackTime(charIdA1, 0) >= 1 then
setAnimTrackTime(charIdA1, 0, 0, 1);
end;

else
disableAnimTrack(charIdA1, 0);
end;

if self.something == 1 then
local charIdA1 = getAnimCharacterSet(self.charIdA1);
local clipIndexA1 = getAnimClipIndex(charIdA1, self.clipIndexA1);

assignAnimTrackClip(charIdA1, 0, clipIndexA1);
setAnimTrackLoopState(charIdA1, 0, false);
setAnimTrackSpeedScale(charIdA1, 0, 1);
enableAnimTrack(charIdA1, 0);

if getAnimTrackTime(charIdA1, 0) >= 45000 then
disableAnimTrack(charIdA1, 0, 0);
end;

else
disableAnimTrack(charIdA1, 0);
end;

if self.something == 2 then
local charIdA1 = getAnimCharacterSet(self.charIdA1);
local clipIndexA1 = getAnimClipIndex(charIdA1, self.clipIndexA1);

assignAnimTrackClip(charIdA1, 0, clipIndexA1);
setAnimTrackLoopState(charIdA1, 0, false);
setAnimTrackSpeedScale(charIdA1, 0, 1);
enableAnimTrack(charIdA1, 0);

if getAnimTrackTime(charIdA1, 0) <= getAnimClipDuration(charIdA1, clipIndexA1) then
enableAnimTrack(charIdA1, 0, 0);
end;

else
disableAnimTrack(charIdA1, 0);
end;

if self.something == 3 then self.something = 0;
end


end;

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

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

function animation:draw()
end;

function animation:delete()
end;

