/// for instance: Unity's WaitForSeconds...WaitForFixedFrame... so on.... IEnumerator _HandleUnityYieldInstruction(int coId, CCoroutineWrapper coWrapper, YieldInstruction wait) { coWrapper.Suspend = true;// Suspend coroutine, wait for seconds push it back yield return(wait); coWrapper.Suspend = false; }
IEnumerator _HandleUnityCoroutine(CCoroutineWrapper coWrapper, Coroutine co) { coWrapper.Suspend = true; yield return(co); coWrapper.Suspend = false; }
public CCoroutineWrapper _NewCoroutine(IEnumerator coFunc) { var co = new CCoroutineWrapper() {CoroutineId = IdGen, CoroutineFunc = coFunc}; IdGen++; co.UpdateMove(); // 開始立刻移動一下 AddQueue.Enqueue(co); return co; }
IEnumerator _HandleCustomRoutine(int coId, CCoroutineWrapper coWrapper, CFiberBase wait) { coWrapper.Suspend = true; _NewCoroutine(wait.DoRun()); // var co = while (!wait.IsFinish) { yield return(null); } coWrapper.Suspend = false; }
public CCoroutineWrapper _NewCoroutine(IEnumerator coFunc) { var co = new CCoroutineWrapper() { CoroutineId = IdGen, CoroutineFunc = coFunc }; IdGen++; co.UpdateMove(); // 開始立刻移動一下 AddQueue.Enqueue(co); return(co); }
/// for instance: Unity's WaitForSeconds...WaitForFixedFrame... so on.... private IEnumerator _HandleUnityYieldInstruction(int coId, CCoroutineWrapper coWrapper, YieldInstruction wait) { coWrapper.Suspend = true; // Suspend coroutine, wait for seconds push it back yield return wait; coWrapper.Suspend = false; }
private IEnumerator _HandleCustomRoutine(int coId, CCoroutineWrapper coWrapper, CFiberBase wait) { coWrapper.Suspend = true; _NewCoroutine(wait.DoRun()); // var co = while (!wait.IsFinish) yield return null; coWrapper.Suspend = false; }
private IEnumerator _HandleUnityCoroutine(CCoroutineWrapper coWrapper, Coroutine co) { coWrapper.Suspend = true; yield return co; coWrapper.Suspend = false; }