Exemplo n.º 1
0
    private IEnumerator ActionCoroutine(AudioClip clip, Action callback, bool wait)
    {
        if (clip)
        {
            clip.PlayUiSource();

            if (wait)
            {
                yield return(new WaitUntil(() => !GameFlow.GF.UiAudio.isPlaying));
            }
        }

        callback?.Invoke();
        yield break;
    }