Example #1
0
    IEnumerator waitForUITrack(uiSounds sound)
    {
        yield return(new WaitWhile(() => uiSounds.isPlaying));

        uiSounds.clip = uiList[(int)sound];
        uiSounds.Play();
    }
Example #2
0
 public AudioSource uiSoundTrack3(uiSounds sound)
 {
     if (!uiSounds3.isPlaying)
     {
         uiSounds3.clip = uiList[(int)sound];
         uiSounds3.Play();
     }
     return(uiSounds);
 }
Example #3
0
 //UI SOUNDS
 public AudioSource uiSoundTrack(uiSounds sound)
 {
     if (!uiSounds.isPlaying)
     {
         uiSounds.clip = uiList[(int)sound];
         uiSounds.Play();
     }
     else if (!uiSounds2.isPlaying)
     {
         uiSoundTrack2(sound);
     }
     else
     {
         uiSoundTrack3(sound);
     }
     return(uiSounds);
 }