add drink and enemy sounds
This commit is contained in:
@@ -173,12 +173,14 @@ public class EventControls : MonoBehaviour
|
||||
isInBattle = false;
|
||||
eventCycleAccumalator = 0;
|
||||
currentEventControl = null;
|
||||
|
||||
|
||||
player.ThrowUserInTheAirHurt();
|
||||
SoundManagerScript.PlaySound("bug laugh");
|
||||
return;
|
||||
}
|
||||
else if (FailedToClickCorrect(currentEventControl.keyCode))
|
||||
{
|
||||
SoundManagerScript.PlaySound("wrong");
|
||||
tilemap.SetTile(currentEventControl.position, currentEventControl.failTile);
|
||||
eventTriggered = false;
|
||||
isInBattle = false;
|
||||
@@ -186,6 +188,7 @@ public class EventControls : MonoBehaviour
|
||||
currentEventControl = null;
|
||||
|
||||
player.ThrowUserInTheAirHurt();
|
||||
SoundManagerScript.PlaySound("bug laugh");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -5,7 +5,7 @@ using UnityEngine;
|
||||
public class SoundManagerScript : MonoBehaviour
|
||||
{
|
||||
|
||||
public static AudioClip jumpSound, screamSound, wrongButtonSound, bugLaughSound;
|
||||
public static AudioClip jumpSound, screamSound, wrongButtonSound, bugLaughSound, drinkSound;
|
||||
static AudioSource audioSrc;
|
||||
|
||||
// Start is called before the first frame update
|
||||
@@ -15,6 +15,7 @@ public class SoundManagerScript : MonoBehaviour
|
||||
screamSound = Resources.Load<AudioClip>("Audio/GirlyScream");
|
||||
wrongButtonSound = Resources.Load<AudioClip>("Audio/WrongButton");
|
||||
bugLaughSound = Resources.Load<AudioClip>("Audio/BugLaugh");
|
||||
drinkSound = Resources.Load<AudioClip>("Audio/Drink");
|
||||
|
||||
audioSrc = GetComponent<AudioSource>();
|
||||
}
|
||||
@@ -41,6 +42,9 @@ public class SoundManagerScript : MonoBehaviour
|
||||
case "bug laugh":
|
||||
audioSrc.PlayOneShot(bugLaughSound);
|
||||
break;
|
||||
case "drink":
|
||||
audioSrc.PlayOneShot(drinkSound);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user