public HalkAMissile(long _uniqueID, Vector3 _position, Quaternion _rotation, int _level)
            : base(_uniqueID, _position, _rotation, "Models/Ships/Halk_Assault_Secondary")
        {
            level = _level;

            if (level == 1)
            {
                Damage = DAMAGE;
                ttd = CHILD_TTD;
                Scale = Scale * 5;

                HalkAMissiles = new HalkAMissile[GRANDCHILDREN_COUNT];
                for (int i = 0; i < GRANDCHILDREN_COUNT; i++)
                {
                    HalkAMissiles[i] = new HalkAMissile(_uniqueID, _position, _rotation, 2);
                }
            }
            else if (level == 2)
            {
                Damage = DAMAGE;
                ttd = GRANDCHILD_TTD;
                Scale = Scale * 10;
            }
            else
            {
                Damage = DAMAGE;
                ttd = 0.0f;
                Scale = Scale * 2;
            }
            projectileSpeed = MISSILE_SPEED;

            CollisionBase.Active = false;
            CollisionBase.Parent = this;
        }
        private float ttd; // Time to detonate

        #endregion Fields

        #region Constructors

        public HalkAMissile(long _uniqueID, Vector3 _position, Quaternion _rotation)
            : base(_uniqueID, _position, _rotation, "Models/Ships/Halk_Assault_Secondary")
        {
            Damage = DAMAGE;

            ttd = PARENT_TTD;

            projectileSpeed = MISSILE_SPEED;

            ((Sphere)detectionSphere.getPhysicsCollider()).CollisionInformation.CollisionRules.Group = halkProjectileGroup;

            HalkAMissiles = new HalkAMissile[CHILDREN_COUNT];

            for (int i = 0; i < CHILDREN_COUNT; i++)
            {
                HalkAMissiles[i] = new HalkAMissile(_uniqueID, _position, _rotation, 1);
            }

            CollisionBase.Active = false;
            CollisionBase.Parent = this;
        }
 public static HalkAMissile addHalkAMissile(HalkAMissile clusterMissile)
 {
     availableHalkAMissiles.Enqueue(clusterMissile);
     return clusterMissile;
 }
        public static HalkAMissile spawnHalkAMissile(long seed, Vector3 position, Quaternion rotation, SceneObject parent)
        {
            HalkAMissile rSecondaryAttack = null;
            if (availableHalkAMissiles.Count == 0)
            {
                rSecondaryAttack = new HalkAMissile(seed, position, rotation);
                rSecondaryAttack.respawn(seed, position, rotation, parent);
            }
            else
            {
                rSecondaryAttack = (HalkAMissile)availableHalkAMissiles.Dequeue();
                rSecondaryAttack.respawn(seed, position, rotation, parent);
            }

            return ((HalkAMissile)Space394Game.GameInstance.CurrentScene.addSceneObject(rSecondaryAttack));
        }