IEnumerator waitForUITrack(uiSounds sound) { yield return(new WaitWhile(() => uiSounds.isPlaying)); uiSounds.clip = uiList[(int)sound]; uiSounds.Play(); }
public AudioSource uiSoundTrack3(uiSounds sound) { if (!uiSounds3.isPlaying) { uiSounds3.clip = uiList[(int)sound]; uiSounds3.Play(); } return(uiSounds); }
//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); }