//HealHealthAndMana() is called when in a healing zone and heals the player's health and mana. public void HealHealthAndMana() { HP += Time.deltaTime * 3; mana += Time.deltaTime * 3; if (HP > 100) { HP = 100; } if (mana > 100) { mana = 100; } if (HP == 100 && mana == 100) { HealingAudio.Stop(); //if health and mana are full, make sure the sound effect has stopped. } //Update the HUD to show the replenishment. UpdateHUDText(); }
//Stops the healing sound effect public void StopHealingAudio() { HealingAudio.Stop(); }