Esempio n. 1
0
 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;
	}
Esempio n. 3
0
    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);
    }
Esempio n. 4
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;
         }
     }
 }
	void Awake () {
		instance = this;
	}
Esempio n. 6
0
 void Awake()
 {
     instance = this;
 }