public void Collect(SubmarineUpgradeData upgradeData) { CurrentUpgrade = upgradeData; upgradeSound.Play(); UpgradeCollected.Invoke(upgradeData); }
public void ApplyUpgrade() { upgradeLevel = GetComponent <SubmarineUpgradeManager>().CurrentUpgrade; interval = (60 / upgradeLevel.RoundsPerMinute) * 1000; rateOfFireLabel.text = $"ROF: {upgradeLevel.RoundsPerMinute}"; maxAmmo = currentAmmo = upgradeLevel.MagazineCapacity; }