Exemplo n.º 1
0
        void ShowTooltip(Ability ability)
        {
            lbTooltipName.text = ability.name;
            lbTooltipDesp.text = ability.GetDesp();

            tooltipRscItem.label.text = ability.GetCost().ToString("f0");

            //~ List<int> cost=tower.GetCost();
            //~ for(int i=0; i<tooltipRscItemList.Count; i++){
            //~ tooltipRscItemList[i].label.text=cost[i].ToString();
            //~ }

            tooltipCanvasG.alpha = 1; tooltipObj.SetActive(true);
        }
Exemplo n.º 2
0
        public void OnHoverAbilityButton(GameObject butObj)
        {
            if (GameControl.GetSelectedTower() != null)
            {
                return;
            }

            int     ID      = GetButtonID(butObj);
            Ability ability = AbilityManager.GetAbilityList()[ID];

            txtTooltipName.text = ability.name;
            txtTooltipCost.text = "" + ability.GetCostInt();
            txtTooltipDesp.text = ability.GetDesp();

            tooltipObj.SetActive(true);
        }