Exemplo n.º 1
0
        protected virtual void AdvanceToNextState()
        {
            CurrentState.OnComplete -= AdvanceToNextState;
            CurrentState             = NextState;

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

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