#
# AA Missile for Cybrans
#
local CAAMissileNaniteProjectile = import('/lua/cybranprojectiles.lua').CAAMissileNaniteProjectile03
CustMissileNanite01 = Class(CAAMissileNaniteProjectile) {

    OnCreate = function(self)
        CAAMissileNaniteProjectile.OnCreate(self)
        self:ForkThread(self.UpdateThread)
    end,

    UpdateThread = function(self)
        WaitSeconds(0.2)
        self:SetMaxSpeed(120)
        self:SetAcceleration(10 + Random() * 8)
        self:ChangeMaxZigZag(0.2)
        self:ChangeZigZagFrequency(2)
    end,

    OnImpact = function(self, TargetType, TargetEntity)
        CAAMissileNaniteProjectile.OnImpact(self, TargetType, TargetEntity)
    end,
}

TypeClass = CustMissileNanite01

