Ejemplo n.º 1
0
 private void DeselectAllUnits()
 {
     if (_selectedBuilding)
     {
         DeselectBuilding();
     }
     if (SelectedUnits.Count > 0)
     {
         SelectedUnits.RemoveAll(u => u == null);
         SelectedUnits.ForEach(delegate(GameObject unit) { unit.GetComponent <Unit>().Deselect(); });
         SelectedUnits.Clear();
         UpdateSelectedUnits();
     }
 }
Ejemplo n.º 2
0
 /// <summary>
 /// ONLY way to remove selection!
 /// </summary>
 public void ClearSelection()
 {
     SelectedUnits.ForEach(a => a.Deselect());
     SelectedUnits.Clear();
 }