public void DestroyAll() { for (int i = Turrets.Count; i > 0; i--) { TurretInstance t = Turrets[i - 1]; t.Destroy(); Turrets.Remove(t); } }
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); }
public void RemoveTurret(TurretInstance turret) { turret.Destroy(); Turrets.Remove(turret); }