public void AddTower(Tower tower) { tower.transform.SetParent(towerPosition); tower.transform.localPosition = Vector3.zero; tower.IsActive = true; Tower = tower; tower.AudioManager.PlayBuyAudio(); PlayerCoins.SpendCoins(tower.Stats.Cost); }
public void UpgradeTower() { PlayerCoins.SpendCoins(tower.Stats.UpgradeCost); tower.AudioManager.PlayUpgradeAudio(); tower.Stats.AdvanceLevel(); SetLevel(); UpdateUpgradeButton(); UpdateSellButton(); tower.Previewable.SetSelectedPreviewable(); TouchInputManager.ButtonClicked = true; }