using System; using UnityEngine; [CreateAssetMenu(fileName = "Cooldown Upgrade", menuName = "AbilityUpgrades/CooldownUpgrade")] public class CooldownUpgrade : AbilityUpgrade { [SerializeField] private float cooldownDifference; protected override void UpgradeEffects(PlayerAbility abilityToUpgrade) { abilityToUpgrade.cooldown = abilityToUpgrade.baseCooldown * ((float)Math.Pow(cooldownDifference, abilityToUpgrade.attachedUpgrades[this])); //almost forgot my math there... } }