Skip to content

Commit 1de804d

Browse files
committed
added all sound effects
each character now has multiple different sound effects that they can use
1 parent 5239ed4 commit 1de804d

File tree

2 files changed

+20
-7
lines changed

2 files changed

+20
-7
lines changed

UnityFiles/Assets/GameGameGame.unity

6.14 KB
Binary file not shown.

UnityFiles/Assets/Scripts/AutoType.cs

Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@ public class AutoType : MonoBehaviour {
2828
public List<string> choicesLinksList;
2929
public List<string> speakersList;
3030
public List<string> contentList;
31+
public AudioSource[] remySources;
32+
public AudioSource[] judgeSources;
33+
public AudioSource[] comcastSources;
3134

3235
// Use this for initialization
3336
void Start () {
@@ -40,6 +43,10 @@ void Start () {
4043
comcast.enabled = false;
4144
judge.enabled = false;
4245
explosion.enabled = false;
46+
remySources = remyAudio.GetComponents<AudioSource>();
47+
judgeSources = judgeAudio.GetComponents<AudioSource>();
48+
comcastSources = comcastAudio.GetComponents<AudioSource>();
49+
4350

4451
// remyClips[0] = AudioClip.Create("R_eh-eh.mp3", 44100, 1, 44100, false, true);
4552
// remyClips[1] = AudioClip.Create("R_Hmmmm.mp3", 44100, 1, 44100, false, true);
@@ -281,19 +288,22 @@ IEnumerator createMessage()
281288
if (speaker == "Flossopher")
282289
{
283290
remy.enabled = true;
284-
remyAudio.Play();
291+
remySources[Random.Range(0, remySources.Length)].Play();
292+
//remyAudio.Play();
285293
}
286294
if (speaker == "Comcast")
287295
{
288296
comcast.enabled = true;
289-
comcastAudio.Play();
297+
comcastSources[Random.Range(0,comcastSources.Length)].Play();
298+
//comcastAudio.Play();
290299
}
291300
if (speaker == "Judge")
292301
{
293302
judge.enabled = true;
294-
judgeAudio.Play();
303+
judgeSources[Random.Range(0,judgeSources.Length)].Play();
304+
//judgeAudio.Play();
295305
}
296-
foreach (char letter in contentList[i])
306+
foreach (char letter in (speakersList[i] + ": " + contentList[i]))
297307
{
298308
message += letter;
299309
yield return 0;
@@ -318,17 +328,20 @@ IEnumerator createMessage()
318328
if (speaker == "Flossopher")
319329
{
320330
remy.enabled = true;
321-
remyAudio.Play();
331+
remySources[Random.Range(0, remySources.Length)].Play();
332+
//remyAudio.Play();
322333
}
323334
if (speaker == "Comcast")
324335
{
325336
comcast.enabled = true;
326-
comcastAudio.Play();
337+
comcastSources[Random.Range(0,comcastSources.Length)].Play();
338+
//comcastAudio.Play();
327339
}
328340
if (speaker == "Judge")
329341
{
330342
judge.enabled = true;
331-
judgeAudio.Play();
343+
judgeSources[Random.Range(0,judgeSources.Length)].Play();
344+
//udgeAudio.Play();
332345
}
333346
foreach (char letter in Twine.TwineData.Current.ContentData.ToString())
334347
{

0 commit comments

Comments
 (0)