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

Binary file not shown.

View File

@@ -0,0 +1,22 @@
fileFormatVersion: 2
guid: a222a0b8edacdf3429911b125a92f715
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:

View File

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