예제 #1
0
        private static IEnumerator WaitLoopCoroutine(Action action, Func <bool> condition, float seconds, bool realTime)
        {
            var delay = new CoroutineDelay(action, seconds, realTime);

            while (!condition())
            {
                yield return(new WaitForFixedUpdate());

                if (seconds == 0)
                {
                    action.Invoke();
                }
                else
                {
                    yield return(delay.Behaviour());
                }
            }
        }
예제 #2
0
 public void DoUpdate(CoroutineDelay action)
 {
     DoUpdate(action.action, action.seconds);
 }