public void Update()
        {
            int count = coroutineQueue.Count;

            while (count-- > 0)
            {
                EditorCoroutine coroutine = coroutineQueue.Dequeue();
                if (!coroutine.IsRunning)
                {
                    continue;
                }
                ICondition condition = coroutine.Current as ICondition;
                if (condition == null || condition.Result(coroutine))
                {
                    if (!coroutine.MoveNext())
                    {
                        continue;
                    }
                }
                coroutineQueue.Enqueue(coroutine);
            }
        }
Ejemplo n.º 2
0
 public void StopCoroutine(EditorCoroutine _coroutine)
 {
     CoroutineMachineController.StopCoroutine(_coroutine);
 }
Ejemplo n.º 3
0
 public static void StopCoroutine(EditorCoroutine _coroutine)
 {
     CoroutineMachine.StopCoroutine(_coroutine);
 }
Ejemplo n.º 4
0
 public bool Result(EditorCoroutine _coroutine)
 {
     return(predicate());
 }
Ejemplo n.º 5
0
 public bool Result(EditorCoroutine _coroutine)
 {
     return(EditorApplication.timeSinceStartup >= _coroutine.TimeSinceStartup + time);
 }
 public void StopCoroutine(EditorCoroutine _coroutine)
 {
     _coroutine.Stop();
 }
Ejemplo n.º 7
0
 public bool Result(EditorCoroutine _coroutine)
 {
     return(!IsRunning);
 }