--
-- Speciaziation class Utb650
-- V1.0
-- @author GKM
-- @date 05/02/2017
-- Copyright (C) GKM, All Rights Reserved.




Utb650 = {};

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

function Utb650:load(savegame)
    self.utb650_propelerAnim = getXMLString(self.xmlFile, "vehicle.propelerAnimation#animName");
    self.utb650_speedDivider = getXMLInt(self.xmlFile, "vehicle.propelerAnimation#speedDivider");

    if self.utb650_propelerAnim ~= nil and self.utb650_speedDivider ~= nil then
        self.utb650_initalized = true;
    else
        self.utb650_initalized = false;
    end
end;

function Utb650:delete()
end;

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

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

function Utb650:update(dt)
    
    if not self.utb650_initalized then
        return;
    end

    if self:getIsMotorStarted() then
        self:playAnimation(self.utb650_propelerAnim, 
                            self.motor.lastMotorRpm / self.utb650_speedDivider, 
                            self:getAnimationTime(self.utb650_propelerAnim), 
                            true);
    else
        self:stopAnimation(self.utb650_propelerAnim);
    end

end;

function Utb650:draw()
end;
