void OnPress(bool isPressed) { if (isPressed) { UnitManager.MoveUnitToSlot(unit); StockUIManager.Refresh(); SlotUIManager.Refresh(); } }
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; } } }