Exemplo n.º 1
0
        IEnumerator QuantizePlayCoroutine(SeSource source, float stopTime)
        {
            while (true)
            {
                if (Music.IsJustChangedBeat())
                {
                    break;
                }
                yield return(null);
            }

            while (source.IsPlay())
            {
                if (stopTime > 0)
                {
                    if (
                        Music.IsJustChangedBeat() &&
                        source.source.time >= stopTime)
                    {
                        break;
                    }
                }


                yield return(null);
            }
            _playSources.Remove(source);
            _pool.Return(source);
        }
Exemplo n.º 2
0
 IEnumerator WaitPlayCoroutine(SeSource source)
 {
     while (source.IsPlay())
     {
         yield return(null);
     }
     _playSources.Remove(source);
     _pool.Return(source);
 }
Exemplo n.º 3
0
        IEnumerator StopLoopCoroutine(SeSource source, float time)
        {
            yield return(new WaitForSeconds(time));

            source.Stop();
        }