Exemplo n.º 1
0
 void OnPress(bool isPressed)
 {
     if (isPressed)
     {
         UnitManager.MoveUnitToSlot(unit);
         StockUIManager.Refresh();
         SlotUIManager.Refresh();
     }
 }
Exemplo n.º 2
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;
	}
Exemplo 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);
    }
Exemplo 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;
         }
     }
 }
Exemplo n.º 5
0
	void Awake () {
		instance = this;
	}
Exemplo n.º 6
0
 void Awake()
 {
     instance = this;
 }