コード例 #1
0
 void OnPress(bool isPressed)
 {
     if (isPressed)
     {
         UnitManager.MoveUnitToSlot(unit);
         StockUIManager.Refresh();
         SlotUIManager.Refresh();
     }
 }
コード例 #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;
	}
コード例 #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);
    }
コード例 #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;
         }
     }
 }
コード例 #5
0
	void Awake () {
		instance = this;
	}
コード例 #6
0
 void Awake()
 {
     instance = this;
 }