IEnumerator DoUpdateCoroutine(CoroutineDelay behavior)
        {
            WaitForFixedUpdate waitForFixedUpdate = new WaitForFixedUpdate();

            while (true)
            {
                yield return(waitForFixedUpdate);

                yield return(behavior.Behaviour());
            }
        }
        static IEnumerator WaitLoopCoroutine(Action action, Func <bool> condition, float seconds, bool realTime)
        {
            CoroutineDelay 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);
 }