Пример #1
0
        //返回协程唯一ID供用户控制协程的流程
        public int CoroutineStart(IEnumerator coroutine, bool autoStart = true)
        {
            CoroutineController controll = new CoroutineController(coroutine);

            coroutineDic.Add(controll.ID, controll);

            if (autoStart)
            {
                controll.Start();
            }

            return(controll.ID);
        }
Пример #2
0
        //只执行一次 不缓存
        public void CoroutineStartOnce(IEnumerator coroutine)
        {
            CoroutineController controll = new CoroutineController(coroutine);

            controll.Start();
        }