Exemplo n.º 1
0
        public static void UMStartCoroutine(this MonoBehaviour self, IEnumerator enumerator)
        {
            UMCoroutine c = new UMCoroutine(enumerator, self);

            c.MoveNext();

            if (!c.IsStopped)
            {
                UMCoroutineManager.AddCoroutine(c);
            }
        }
Exemplo n.º 2
0
 /// <summary>
 /// 对 Coroutine 执行一次更新。
 /// </summary>
 /// <param name="coroutine">待更新的 Coroutine 实例。</param>
 private static void UpdateCoroutine(UMCoroutine coroutine)
 {
     if (coroutine.IsWaiting)
     {
         coroutine.Wait();
     }
     else
     {
         coroutine.MoveNext();
     }
 }