示例#1
0
        protected virtual void AdvanceToNextState()
        {
            CurrentState.OnComplete -= AdvanceToNextState;
            CurrentState             = NextState;

            if (CurrentState != null)
            {
                CurrentState.OnComplete += AdvanceToNextState;
                CurrentState.Start(nextStateArgs);
            }

            NextState     = null;
            nextStateArgs = null;
        }
示例#2
0
 protected virtual void SetNextState(SmartRoutine.UpdateBehaviorFunc nextStateFunc, params object[] args)
 {
     NextState     = new SmartRoutine(nextStateFunc);
     nextStateArgs = args;
 }