Beispiel #1
0
        /// <summary>
        /// 可以运行一段协同代码
        /// </summary>
        /// <param name="a">协同方法</param>
        public static CoroutineCall Call(Func <IEnumerator> a)
        {
            CoroutineCall coroutineCall = ParasiticComponent.parasiteHost.AddComponent <CoroutineCall>();

            coroutineCall.a         = a;
            coroutineCall.coroutine = coroutineCall.StartCoroutine(coroutineCall.CallCoroutine());
            return(coroutineCall);
        }