public void SelectTile(BuildTowers tile) { if (selectedTile == tile) { DeselectTile(); return; } selectedTile = tile; turretToBuild = null; selectUI.SetTarget(tile); }
public void SetTarget(BuildTowers _target) { target = _target; transform.position = target.GetBuildPosition(); if (!target.isUpgraded) { upgradeCost.text = "$" + target.turretBlueprint.upgradeCost; upgradeButton.interactable = true; } else { upgradeCost.text = "MAX"; upgradeButton.interactable = false; } sellAmount.text = "$" + target.turretBlueprint.GetSellAmount(); ui.SetActive(true); }
public void DeselectTile() { selectedTile = null; selectUI.Hide(); }