Example #1
0
    public void Awake()
    {
        instance = this;
        //thisObj=gameObject;
        //rectT=thisObj.GetComponent<RectTransform>();


        AbilityManagerUnit abManagerUnit = (AbilityManagerUnit)FindObjectOfType(typeof(AbilityManagerUnit));

        if (abManagerUnit != null)
        {
            abManagerUnit.Init();
        }

        InitiateElement();

        abilityTooltipObj.SetActive(false);
    }
Example #2
0
    public void OnAvailableItem(GameObject butObj, int pointerID = -1)
    {
        int newID = GetAvailableItemID(butObj);

        if (selectedTab == _SelectedTab.Available && selectedID == newID)
        {
            return;
        }

        ClearSelected();

        selectedTab = _SelectedTab.Available;
        selectedID  = newID;
        avaiItemList[selectedID].imgHighlight.gameObject.SetActive(true);

        buttonAdd.button.interactable    = true;
        buttonRemove.button.interactable = false;

        DemoUIUnitInfo.UpdateDisplay(DemoCampaign.GetAvailableUnit(selectedID));
    }