public void OnExitBuildButton(GameObject butObj) { if (!ValidForInteraction()) { return; } UITooltip.Hide(); if (UIControl.UsePointNBuildMode()) { TowerManager.HideSampleTower(); } }
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(); }
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(); }
public override void Awake() { base.Awake(); instance = this; }
public void OnExitUpgradeButton(GameObject butObj) { UITooltip.Hide(); }
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 OnExitSellButton(GameObject butObj) { UITooltip.Hide(); }
public void OnHoverSellButton(GameObject butObj) { UITooltip.ShowSell(sTower, UI.GetCorner(buttonSell.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)); }