Exemple #1
0
 public void DestroyAll()
 {
     for (int i = Turrets.Count; i > 0; i--)
     {
         TurretInstance t = Turrets[i - 1];
         t.Destroy();
         Turrets.Remove(t);
     }
 }
Exemple #2
0
        public TurretInstance GetTurretAtPosition(MapPos pos)
        {
            TurretInstance found = null;

            for (int j = 0; j < Turrets.Count; j++)
            {
                if ((Turrets[j].Position.x == pos.x) &&
                    (Turrets[j].Position.z == pos.z))
                {
                    found = Turrets[j];
                    break;
                }
            }
            return(found);
        }
Exemple #3
0
 public void RemoveTurret(TurretInstance turret)
 {
     turret.Destroy();
     Turrets.Remove(turret);
 }