void removeDeadUnitsFromSelections() { // units for (int i = 0; i < Unit.DeadUnits.Count;) { Unit unit = Unit.DeadUnits[i]; SelectingUnits.Remove(unit); SelectedUnits.Remove(unit); selectedUnitsChanged = true; foreach (List <RtsObject> group in HotkeyGroups) { group.Remove(unit); } Unit.DeadUnits.Remove(unit); } // structures for (int i = 0; i < Structure.DeadStructures.Count;) { Structure structure = Structure.DeadStructures[i]; SelectingUnits.Remove(structure); SelectedUnits.Remove(structure); selectedUnitsChanged = true; foreach (List <RtsObject> group in HotkeyGroups) { group.Remove(structure); } Structure.DeadStructures.Remove(structure); } }
private void DeselectUnit(Unit iUnit) { SelectedUnits.Remove(iUnit.gameObject); iUnit.Deselect(); UpdateSelectedUnits(); }
public void RemoveFromSelection(UnitSelection unitSelection) { unitSelection.Deselect(); SelectedUnits.Remove(unitSelection); }