void OnPress(bool isPressed) { if (isPressed) { UnitManager.MoveUnitToSlot(unit); StockUIManager.Refresh(); SlotUIManager.Refresh(); } }
private static bool IsInstance () { if (instance == null) { instance = FindObjectOfType (typeof (SlotUIManager)) as SlotUIManager; if (instance == null) { Debug.LogError ("Can't seem to find any Gameobject that has SlotUIManager class"); return false; } } return true; }
private static bool IsInstance() { if (instance == null) { instance = FindObjectOfType(typeof(SlotUIManager)) as SlotUIManager; if (instance == null) { Debug.LogError("Can't seem to find any Gameobject that has SlotUIManager class"); return(false); } } return(true); }
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; } } }
void Awake () { instance = this; }
void Awake() { instance = this; }