IEnumerator ScheduleEffect(AmbientSound sound) { yield return(new WaitForSeconds(sound.GetNextTime())); source.PlayOneShot(sound.clip, sound.volume); StartCoroutine(ScheduleEffect(sound)); }