IEnumerator Coroutine3() { while (true) { yield return(YieldInstructioner.GetWaitForSeconds(1)); Debug.Log("协程 Coroutine3 执行!"); } }
IEnumerator Coroutine4(string value) { yield return(YieldInstructioner.GetWaitForEndOfFrame()); Debug.Log("协程 Coroutine4 执行!参数:" + value); }
IEnumerator Coroutine2() { yield return(YieldInstructioner.GetWaitForEndOfFrame()); Debug.Log("协程 Coroutine2 执行!"); }
private static IEnumerator DelayExecute(Action action, float delaySeconds) { yield return(YieldInstructioner.GetWaitForSeconds(delaySeconds)); action(); }