Пример #1
0
 public static void ReselectUnit()
 {
     //Debug.Log("ReselectUnit");
     if (selectedUnit != null)
     {
         GridManager.SelectUnit(selectedUnit);
         FactionManager.SelectUnit();
         TBTK.OnUnitSelected(selectedUnit);
     }
 }
Пример #2
0
        public static void SelectUnit(Unit unit, bool userInitiated = true)
        {
            if (userInitiated && !CanSelectUnit(unit))
            {
                return;
            }

            if (selectedUnit == unit)
            {
                Debug.Log("attempt to select the same unit");
                return;
            }

            selectedUnit = unit;
            GridManager.SelectUnit(unit);
            FactionManager.SelectUnit();

            selectedUnit.PlaySelectAudio();

            TBTK.OnUnitSelected(selectedUnit);
        }