Example #1
0
 public void OnExitBuildButton(GameObject butObj)
 {
     if (!ValidForInteraction())
     {
         return;
     }
     UITooltip.Hide();
     if (UIControl.UsePointNBuildMode())
     {
         TowerManager.HideSampleTower();
     }
 }
Example #2
0
        public void OnUpgradeButton(GameObject butObj, int pointerID = -1)
        {
            int idx = UI.GetItemIndex(butObj, upgradeButtons);

            List <float> upgradeCost = sTower.GetUpgradeCost(idx);

            if (CheckCost(upgradeCost))
            {
                //RscManager.SpendRsc(upgradeCost);
                sTower.Upgrade(idx);
                SelectControl.ClearUnit();
                Hide();
            }

            UITooltip.Hide();
        }
Example #3
0
        public void OnClearSelectButton(GameObject butObj, int pointerID = -1)
        {
            if (!AbilityManager.IsEnabled())
            {
                return;
            }

            if (touchModeButtonIdx >= 0)
            {
                ClearTouchModeSelect();
            }
            else
            {
                UIControl.ClearSelectedAbility();
                for (int i = 0; i < abilityButtons.Count; i++)
                {
                    abilityButtons[i].imgHighlight.gameObject.SetActive(false);
                }
            }

            buttonClearSelect.SetActive(false);

            UITooltip.Hide();
        }
Example #4
0
        public override void Awake()
        {
            base.Awake();

            instance = this;
        }
Example #5
0
 public void OnExitUpgradeButton(GameObject butObj)
 {
     UITooltip.Hide();
 }
Example #6
0
        public void OnHoverUpgradeButton(GameObject butObj)
        {
            int idx = UI.GetItemIndex(butObj, upgradeButtons);

            UITooltip.ShowUpgrade(sTower, idx, UI.GetCorner(upgradeButtons[idx].rectT, 2), 0, new Vector3(0, .25f, 0));
        }
Example #7
0
 public void OnExitSellButton(GameObject butObj)
 {
     UITooltip.Hide();
 }
Example #8
0
 public void OnHoverSellButton(GameObject butObj)
 {
     UITooltip.ShowSell(sTower, UI.GetCorner(buttonSell.rectT, 2), 0, new Vector3(0, .25f, 0));
 }
Example #9
0
        public void OnHoverAbilityButton(GameObject butObj)
        {
            int idx = UI.GetItemIndex(butObj, abilityButtons);

            UITooltip.Show(AbilityManager.GetAbility(idx), UI.GetCorner(abilityButtons[idx].rectT, 2), 3, new Vector3(0, .25f, 0));
        }