예제 #1
0
        /// <summary>
        /// /// <summary>
        /// TODO 为嵌套NewStartStep的缓存下 StepProcess
        /// </summary>
        /// </summary>
        /// <param name="iEnumerator"></param>
        /// <returns></returns>
        public static Step NewStartStep(IEnumerator <Step> iEnumerator)
        {
            var         step        = NewStep();
            StepProcess stepProcess = null;

            step.SetOnStart(() =>
            {
                stepProcess = new StepProcess();
                stepProcess.StartStep(iEnumerator);
                return(false);
            });
            step.SetOnUpdate(() =>
            {
                if (stepProcess == null)
                {
                    return(true);
                }
                if (stepProcess.Update())
                {
                    stepProcess = null;
                    return(true);
                }
                return(false);
            });
            return(step);
        }
예제 #2
0
 public static Step NewStartStep(this StepProcess stepProcess, IEnumerator <Step> iEnumerator)
 {
     return(StepPool.NewStartStep(iEnumerator));
 }
예제 #3
0
 public static Step NewWaitStep(this StepProcess stepProcess, Func <bool> waitFn)
 {
     return(StepPool.NewWaitStep(waitFn));
 }
예제 #4
0
 public static Step NewWaitFrame(this StepProcess stepProcess, int frame)
 {
     return(StepPool.NewWaitFrame(frame));
 }
예제 #5
0
 public static Step NewWaitTime(this StepProcess stepProcess, float needWaitTime, bool realTime = true)
 {
     return(StepPool.NewWaitTime(needWaitTime, realTime));
 }
예제 #6
0
 public static Step NewStep(this StepProcess stepProcess)
 {
     return(StepPool.NewStep());
 }