void OnPress(bool isPressed)
 {
     if (isPressed)
     {
         UnitManager.MoveUnitToSlot(unit);
         StockUIManager.Refresh();
         SlotUIManager.Refresh();
     }
 }
Example #2
0
 void OnPress(bool isPressed)
 {
     if (isPressed)
     {
         if (Game.GamePhase == GamePhase.Selection)
         {
             UnitManager.MoveUnitToStock(unit);
             SlotUIManager.Refresh();
             StockUIManager.Refresh();
         }
         else
         {
             DisableOtherButtons(this);
             IsSelected = !IsSelected;
             UnitCreator.UnitToCreate = (IsSelected) ? unit : null;
         }
     }
 }