public virtual void Execute(Entity entity, EnemyModel component)
 {
     if (entity.hasCircleMissileSpawner)
         entity.RemoveCircleMissileSpawner();
     if (entity.hasCircleMissileRotatedSpawner)
         entity.RemoveCircleMissileRotatedSpawner();
     if (entity.hasDispersionMissileSpawner)
         entity.RemoveDispersionMissileSpawner();
     if (entity.hasHomeMissileSpawner)
         entity.RemoveHomeMissileSpawner();
     if (entity.hasLaserSpawner)
         entity.RemoveLaserSpawner();
     if (entity.hasMultipleMissileSpawner)
         entity.RemoveMultipleMissileSpawner();
     if (entity.hasMissileSpawner)
         entity.RemoveMissileSpawner();
     if (entity.hasTargetMissileSpawner)
         entity.RemoveTargetMissileSpawner();
 }
Example #2
0
    void removeWeapons(ShipModelComponent component, Entity e)
    {
        if (e.hasMissileSpawner)
        {
            e.RemoveMissileSpawner();

            if (component.hasSecondaryMissiles)
            {
                List<Entity> children = e.parent.children;
                for (int i = 0; i < children.Count; i++)
                {
                    Entity child = children[i];
                    if (child.isSecondaryWeapon)
                    {
                        child.RemoveMissileSpawner();
                    }
                }
            }
        }
    }