Exemplo n.º 1
0
    public void UpgradeRange()
    {
        DefenseTowers dt = curSelected.GetComponent <DefenseTowers>();

        if (dt.weaponRate.upgrade.curLvl >= dt.weaponRate.upgrade.maxLvl)
        {
            maxedOut.Play();
            return;
        }
        upgradeSound.Play();
        dt.weaponRate.fireRate -= dt.weaponRate.upgrade.fireRate;
        dt.weaponRate.upgrade.curLvl++;
    }
Exemplo n.º 2
0
    public void UpgradeDamage()
    {
        DefenseTowers dt = curSelected.gameObject.GetComponent <DefenseTowers>();

        if (dt.firePower.upgrade.curLvl >= dt.firePower.upgrade.maxLvl)
        {
            maxedOut.Play();
            return;
        }

        upgradeSound.Play();
        dt.firePower.damage += dt.firePower.upgrade.damage;
        dt.firePower.upgrade.curLvl++;
    }