add drink and enemy sounds

This commit is contained in:
chyknkat
2020-02-02 00:04:39 -05:00
parent fd246fb6fc
commit 6f2196aa81
5 changed files with 32 additions and 2 deletions

View File

@@ -85,6 +85,7 @@ public class Player : MonoBehaviour
private void DrinkCoffee()
{
SoundManagerScript.PlaySound("drink");
int result = currentStamina + GetStaminaValueChange(coffeValuePercent);
currentStamina = result < startStamina ? result : startStamina;
staminaBar.size = new Vector2(staminaBar.size.x * (currentStamina/startStamina), staminaBar.size.y);