Ejemplo n.º 1
0
    /// 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;
    }
Ejemplo n.º 2
0
    IEnumerator _HandleUnityCoroutine(CCoroutineWrapper coWrapper, Coroutine co)
    {
        coWrapper.Suspend = true;
        yield return(co);

        coWrapper.Suspend = false;
    }
Ejemplo n.º 3
0
    public CCoroutineWrapper _NewCoroutine(IEnumerator coFunc)
    {
        var co = new CCoroutineWrapper() {CoroutineId = IdGen, CoroutineFunc = coFunc};
        IdGen++;

        co.UpdateMove(); // 開始立刻移動一下
        AddQueue.Enqueue(co);

        return co;
    }
Ejemplo n.º 4
0
 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;
 }
Ejemplo n.º 5
0
    public CCoroutineWrapper _NewCoroutine(IEnumerator coFunc)
    {
        var co = new CCoroutineWrapper()
        {
            CoroutineId = IdGen, CoroutineFunc = coFunc
        };

        IdGen++;

        co.UpdateMove();  // 開始立刻移動一下
        AddQueue.Enqueue(co);

        return(co);
    }
Ejemplo n.º 6
0
 /// 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;
 }
Ejemplo n.º 7
0
 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;
 }
Ejemplo n.º 8
0
 private IEnumerator _HandleUnityCoroutine(CCoroutineWrapper coWrapper, Coroutine co)
 {
     coWrapper.Suspend = true;
     yield return co;
     coWrapper.Suspend = false;
 }