예제 #1
0
        IEnumerator Coroutine3()
        {
            while (true)
            {
                yield return(YieldInstructioner.GetWaitForSeconds(1));

                Debug.Log("协程 Coroutine3 执行!");
            }
        }
예제 #2
0
        IEnumerator Coroutine4(string value)
        {
            yield return(YieldInstructioner.GetWaitForEndOfFrame());

            Debug.Log("协程 Coroutine4 执行!参数:" + value);
        }
예제 #3
0
        IEnumerator Coroutine2()
        {
            yield return(YieldInstructioner.GetWaitForEndOfFrame());

            Debug.Log("协程 Coroutine2 执行!");
        }
예제 #4
0
    private static IEnumerator DelayExecute(Action action, float delaySeconds)
    {
        yield return(YieldInstructioner.GetWaitForSeconds(delaySeconds));

        action();
    }