public void AddGenericUpgrade(GenericUpgradeEnum upgrade, float?expireInSeconds = null) { if (upgrade == GenericUpgradeEnum.Projectile) { playerProjectileController.AddProjectile(expireInSeconds); } if (upgrade == GenericUpgradeEnum.ShotSpeed) { playerShoot.IncreaseShotSpeed(); } else if (upgrade == GenericUpgradeEnum.Immunity) { playerImmunity.SetImmunity(expireInSeconds ?? 0); } }
public UpgradeType(GenericUpgradeEnum upgrade, float?expiresInSeconds) { Upgrade = upgrade; ExpiresInSeconds = expiresInSeconds; }