add bug laugh

This commit is contained in:
chyknkat
2020-02-01 22:15:40 -05:00
parent c30fbb95d6
commit 7b9073457d
3 changed files with 29 additions and 3 deletions

View File

@@ -5,15 +5,16 @@ using UnityEngine;
public class SoundManagerScript : MonoBehaviour
{
public static AudioClip jumpSound, screamSound, wrongButtonSound;
public static AudioClip jumpSound, screamSound, wrongButtonSound, bugLaughSound;
static AudioSource audioSrc;
// Start is called before the first frame update
void Start()
{
jumpSound = Resources.Load<AudioClip>("Audio/Jump");
jumpSound = Resources.Load<AudioClip>("Audio/GirlyScream");
jumpSound = Resources.Load<AudioClip>("Audio/WrongButton");
screamSound = Resources.Load<AudioClip>("Audio/GirlyScream");
wrongButtonSound = Resources.Load<AudioClip>("Audio/WrongButton");
bugLaughSound = Resources.Load<AudioClip>("Audio/BugLaugh");
audioSrc = GetComponent<AudioSource>();
}
@@ -37,6 +38,9 @@ public class SoundManagerScript : MonoBehaviour
case "wrong":
audioSrc.PlayOneShot(wrongButtonSound);
break;
case "bug laugh":
audioSrc.PlayOneShot(bugLaughSound);
break;
}
}
}