Beispiel #1
0
        public void OnHoverBuildButton(GameObject butObj)
        {
            Debug.Log(butObj);
            if (!ValidForInteraction())
            {
                return;
            }

            int idx = UI.GetItemIndex(butObj, buildButtons);

            if (UIControl.UseDragNDropMode())
            {
                UITooltip.Show(buildableList[idx], UI.GetCorner(buildButtons[idx].rectT, 1), 0, new Vector3(0, .25f, 0));
            }
            else
            {
                if (UIControl.UsePieMenuForBuild())
                {
                    UITooltip.Show(sInfo.buildableList[idx]);
                }
                else
                {
                    UITooltip.Show(sInfo.buildableList[idx], UI.GetCorner(buildButtons[idx].rectT, 1), 0, new Vector3(0, .25f, 0));
                }
            }

            if (UIControl.UsePointNBuildMode())
            {
                TowerManager.ShowSampleTower(sInfo.buildableList[idx].prefabID, sInfo);
            }
        }
Beispiel #2
0
 public void OnHoverSellButton(GameObject butObj)
 {
     UITooltip.ShowSell(sTower, UI.GetCorner(buttonSell.rectT, 2), 0, new Vector3(0, .25f, 0));
 }
Beispiel #3
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));
        }
        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));
        }