예제 #1
0
        IEnumerator RunEndOfFrameMicroCoroutine()
        {
            this.endOfFrameMicroCoroutine = new MicroCoroutine(
                () =>
            {
                if (endOfFrameCountForRefresh > EndOfFrameRefreshCycle)
                {
                    endOfFrameCountForRefresh = 0;
                    return(true);
                }
                else
                {
                    return(false);
                }
            },
                ex => unhandledExceptionCallback(ex));

            while (true)
            {
                yield return(YieldInstructionCache.WaitForEndOfFrame);

                endOfFrameCountForRefresh++;
                endOfFrameMicroCoroutine.Run();
            }
        }
예제 #2
0
        IEnumerator RunFixedUpdateMicroCoroutine()
        {
            this.fixedUpdateMicroCoroutine = new MicroCoroutine(
                () =>
            {
                if (fixedUpdateCountForRefresh > FixedUpdateRefreshCycle)
                {
                    fixedUpdateCountForRefresh = 0;
                    return(true);
                }
                else
                {
                    return(false);
                }
            },
                ex => unhandledExceptionCallback(ex));

            while (true)
            {
                yield return(YieldInstructionCache.WaitForFixedUpdate);

                fixedUpdateCountForRefresh++;
                fixedUpdateMicroCoroutine.Run();
            }
        }
예제 #3
0
        IEnumerator RunUpdateMicroCoroutine()
        {
            this.updateMicroCoroutine = new MicroCoroutine(
                () =>
            {
                if (updateCountForRefresh > UpdateRefreshCycle)
                {
                    updateCountForRefresh = 0;
                    return(true);
                }
                else
                {
                    return(false);
                }
            },
                ex => unhandledExceptionCallback(ex));

            while (true)
            {
                yield return(null);

                updateCountForRefresh++;
                updateMicroCoroutine.Run();
            }
        }
예제 #4
0
 void LateUpdate()
 {
     if (lateUpdate != null)
     {
         lateUpdate.OnNext(Unit.Default);
     }
     lateUpdateMicroCoroutine.Run();
 }
예제 #5
0
        IEnumerator RunEndOfFrameMicroCoroutine()
        {
            while (true)
            {
                yield return(YieldInstructionCache.WaitForEndOfFrame);

                endOfFrameMicroCoroutine.Run();
            }
        }
예제 #6
0
        IEnumerator RunFixedUpdateMicroCoroutine()
        {
            while (true)
            {
                yield return(YieldInstructionCache.WaitForFixedUpdate);

                fixedUpdateMicroCoroutine.Run();
            }
        }
예제 #7
0
        IEnumerator RunUpdateMicroCoroutine()
        {
            while (true)
            {
                yield return(null);

                updateMicroCoroutine.Run();
            }
        }
예제 #8
0
        IEnumerator RunEndOfFrameMicroCoroutine()
        {
            this.endOfFrameMicroCoroutine = new MicroCoroutine(ex => unhandledExceptionCallback(ex));

            while (true)
            {
                yield return(YieldInstructionCache.WaitForEndOfFrame);

                endOfFrameMicroCoroutine.Run();
            }
        }
예제 #9
0
        IEnumerator RunFixedUpdateMicroCoroutine()
        {
            this.fixedUpdateMicroCoroutine = new MicroCoroutine(ex => unhandledExceptionCallback(ex));

            while (true)
            {
                yield return(YieldInstructionCache.WaitForFixedUpdate);

                fixedUpdateMicroCoroutine.Run();
            }
        }
예제 #10
0
        IEnumerator RunUpdateMicroCoroutine()
        {
            this.updateMicroCoroutine = new MicroCoroutine(ex => unhandledExceptionCallback(ex));

            while (true)
            {
                yield return(null);

                updateMicroCoroutine.Run();
            }
        }
예제 #11
0
    IEnumerator RunFixedUpdateMicroCoroutine()
    {
        var fu = new WaitForFixedUpdate();

        while (true)
        {
            yield return(fu);

            fixedUpdateMicroCoroutine.Run();
        }
    }
예제 #12
0
    IEnumerator RunEndOfFrameMicroCoroutine()
    {
        var eof = new WaitForEndOfFrame();

        while (true)
        {
            yield return(eof);

            endOfFrameMicroCoroutine.Run();
        }
    }