Example #1
0
    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);
    }
Example #2
0
    public void UpgradeTower()
    {
        PlayerCoins.SpendCoins(tower.Stats.UpgradeCost);
        tower.AudioManager.PlayUpgradeAudio();

        tower.Stats.AdvanceLevel();

        SetLevel();
        UpdateUpgradeButton();
        UpdateSellButton();

        tower.Previewable.SetSelectedPreviewable();

        TouchInputManager.ButtonClicked = true;
    }