Merge branch 'master' of https://github.com/SweetTini/GlobalGameJam2020
This commit is contained in:
BIN
Assets/Resources/Audio/Drink.ogg
Normal file
BIN
Assets/Resources/Audio/Drink.ogg
Normal file
Binary file not shown.
22
Assets/Resources/Audio/Drink.ogg.meta
Normal file
22
Assets/Resources/Audio/Drink.ogg.meta
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 25942ecb34ea3764fad9cf75dc8a4f70
|
||||||
|
AudioImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 6
|
||||||
|
defaultSettings:
|
||||||
|
loadType: 0
|
||||||
|
sampleRateSetting: 0
|
||||||
|
sampleRateOverride: 44100
|
||||||
|
compressionFormat: 1
|
||||||
|
quality: 1
|
||||||
|
conversionMode: 0
|
||||||
|
platformSettingOverrides: {}
|
||||||
|
forceToMono: 0
|
||||||
|
normalize: 1
|
||||||
|
preloadAudioData: 1
|
||||||
|
loadInBackground: 0
|
||||||
|
ambisonic: 0
|
||||||
|
3D: 1
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
@@ -173,12 +173,14 @@ public class EventControls : MonoBehaviour
|
|||||||
isInBattle = false;
|
isInBattle = false;
|
||||||
eventCycleAccumalator = 0;
|
eventCycleAccumalator = 0;
|
||||||
currentEventControl = null;
|
currentEventControl = null;
|
||||||
|
|
||||||
player.ThrowUserInTheAirHurt();
|
player.ThrowUserInTheAirHurt();
|
||||||
|
SoundManagerScript.PlaySound("bug laugh");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else if (FailedToClickCorrect(currentEventControl.keyCode))
|
else if (FailedToClickCorrect(currentEventControl.keyCode))
|
||||||
{
|
{
|
||||||
|
SoundManagerScript.PlaySound("wrong");
|
||||||
tilemap.SetTile(currentEventControl.position, currentEventControl.failTile);
|
tilemap.SetTile(currentEventControl.position, currentEventControl.failTile);
|
||||||
eventTriggered = false;
|
eventTriggered = false;
|
||||||
isInBattle = false;
|
isInBattle = false;
|
||||||
@@ -186,6 +188,7 @@ public class EventControls : MonoBehaviour
|
|||||||
currentEventControl = null;
|
currentEventControl = null;
|
||||||
|
|
||||||
player.ThrowUserInTheAirHurt();
|
player.ThrowUserInTheAirHurt();
|
||||||
|
SoundManagerScript.PlaySound("bug laugh");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -85,6 +85,7 @@ public class Player : MonoBehaviour
|
|||||||
|
|
||||||
private void DrinkCoffee()
|
private void DrinkCoffee()
|
||||||
{
|
{
|
||||||
|
SoundManagerScript.PlaySound("drink");
|
||||||
int result = currentStamina + GetStaminaValueChange(coffeValuePercent);
|
int result = currentStamina + GetStaminaValueChange(coffeValuePercent);
|
||||||
currentStamina = result < startStamina ? result : startStamina;
|
currentStamina = result < startStamina ? result : startStamina;
|
||||||
staminaBar.size = new Vector2(staminaBar.size.x * (currentStamina/startStamina), staminaBar.size.y);
|
staminaBar.size = new Vector2(staminaBar.size.x * (currentStamina/startStamina), staminaBar.size.y);
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ using UnityEngine;
|
|||||||
public class SoundManagerScript : MonoBehaviour
|
public class SoundManagerScript : MonoBehaviour
|
||||||
{
|
{
|
||||||
|
|
||||||
public static AudioClip jumpSound, screamSound, wrongButtonSound, bugLaughSound;
|
public static AudioClip jumpSound, screamSound, wrongButtonSound, bugLaughSound, drinkSound;
|
||||||
static AudioSource audioSrc;
|
static AudioSource audioSrc;
|
||||||
|
|
||||||
// Start is called before the first frame update
|
// Start is called before the first frame update
|
||||||
@@ -15,6 +15,7 @@ public class SoundManagerScript : MonoBehaviour
|
|||||||
screamSound = Resources.Load<AudioClip>("Audio/GirlyScream");
|
screamSound = Resources.Load<AudioClip>("Audio/GirlyScream");
|
||||||
wrongButtonSound = Resources.Load<AudioClip>("Audio/WrongButton");
|
wrongButtonSound = Resources.Load<AudioClip>("Audio/WrongButton");
|
||||||
bugLaughSound = Resources.Load<AudioClip>("Audio/BugLaugh");
|
bugLaughSound = Resources.Load<AudioClip>("Audio/BugLaugh");
|
||||||
|
drinkSound = Resources.Load<AudioClip>("Audio/Drink");
|
||||||
|
|
||||||
audioSrc = GetComponent<AudioSource>();
|
audioSrc = GetComponent<AudioSource>();
|
||||||
}
|
}
|
||||||
@@ -41,6 +42,9 @@ public class SoundManagerScript : MonoBehaviour
|
|||||||
case "bug laugh":
|
case "bug laugh":
|
||||||
audioSrc.PlayOneShot(bugLaughSound);
|
audioSrc.PlayOneShot(bugLaughSound);
|
||||||
break;
|
break;
|
||||||
|
case "drink":
|
||||||
|
audioSrc.PlayOneShot(drinkSound);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user