add sounds to intro story
This commit is contained in:
@@ -79,6 +79,7 @@ public class GameIntroCutscene : Cutscene
|
||||
yield return new WaitForSeconds(.8f);
|
||||
|
||||
sceneC.sprite = sprites[3];
|
||||
SoundManagerScript.PlaySound("slam");
|
||||
Shake(15);
|
||||
|
||||
yield return new WaitForSeconds(1f);
|
||||
@@ -120,6 +121,7 @@ public class GameIntroCutscene : Cutscene
|
||||
|
||||
sceneC.sprite = sprites[2];
|
||||
sceneB.sprite = sprites[6];
|
||||
SoundManagerScript.PlaySound("slam");
|
||||
Shake(20);
|
||||
|
||||
yield return new WaitForSeconds(1.5f);
|
||||
|
||||
@@ -7,7 +7,7 @@ public class SoundManagerScript : MonoBehaviour
|
||||
|
||||
public static AudioClip jumpSound, screamSound, wrongButtonSound,
|
||||
bugLaughSound, drinkSound, eatSound, punchSound, hardPunchSound,
|
||||
slapSound, hardSlapSound, winSound;
|
||||
slapSound, hardSlapSound, winSound, slamSound;
|
||||
public static AudioSource audioSrc;
|
||||
|
||||
// Start is called before the first frame update
|
||||
@@ -24,6 +24,7 @@ public class SoundManagerScript : MonoBehaviour
|
||||
slapSound = Resources.Load<AudioClip>("Audio/Slap");
|
||||
hardSlapSound = Resources.Load<AudioClip>("Audio/HardSlap");
|
||||
winSound = Resources.Load<AudioClip>("Audio/Win");
|
||||
slamSound = Resources.Load<AudioClip>("Audio/Slam");
|
||||
|
||||
audioSrc = GetComponent<AudioSource>();
|
||||
}
|
||||
@@ -72,6 +73,9 @@ public class SoundManagerScript : MonoBehaviour
|
||||
case "win":
|
||||
sound = winSound;
|
||||
break;
|
||||
case "slam":
|
||||
sound = slamSound;
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user