public void UpgradeAttack() { _currencyManager.AddGold(-atkUpgradeCost); if ((Mathf.Round((float)damage * attackUpgradeMultiplier) == damage)) { damage++; } else { damage = (int)Mathf.Round((float)damage * attackUpgradeMultiplier); } atkUpgradeCost = (int)Mathf.Round(atkUpgradeCost * costUpgradeMultiplier); atkUpgradeCostText.text = UpgradeCostFormat(atkUpgradeCost); _myAnimator.SetTrigger("GetUpgrade"); }