Esempio n. 1
0
 void WaitAfterSolved()
 {
     if (jingle.isPlaying)
     {
         jingle.Stop(4.5f);
         StartAllOtherLocations();
     }
 }
Esempio n. 2
0
    IEnumerator RandomPlayer(AudioSourcePRO s, Ambience.AmbienceSetting setting, Ambience ambience, bool immediate = false)
    {
        if (immediate)
        {
            yield return(new WaitForSeconds(setting.Delay()));
        }
        if (!s.isPlaying)
        {
            s.timeSamples = Random.Range(0, s.clip.samples);
            s.Play(ambience.Fade());
        }
        yield return(new WaitForSeconds(setting.Delay()));

        s.Stop(ambience.Fade());
        yield return(new WaitForSeconds(setting.Delay()));

        StartCoroutine(RandomPlayer(s, setting, ambience));
    }