public void Collect(SubmarineUpgradeData upgradeData)
    {
        CurrentUpgrade = upgradeData;

        upgradeSound.Play();

        UpgradeCollected.Invoke(upgradeData);
    }
Ejemplo n.º 2
0
    public void ApplyUpgrade()
    {
        upgradeLevel = GetComponent <SubmarineUpgradeManager>().CurrentUpgrade;

        interval = (60 / upgradeLevel.RoundsPerMinute) * 1000;

        rateOfFireLabel.text = $"ROF: {upgradeLevel.RoundsPerMinute}";

        maxAmmo = currentAmmo = upgradeLevel.MagazineCapacity;
    }