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()); } } }
public void DoUpdate(CoroutineDelay action) { DoUpdate(action.action, action.seconds); }