Exemple #1
0
        private IEnumerator ChangeState(StateControllerBase state)
        {
            if (CurrentState != null)
            {
                yield return(CurrentState.ExitState());
            }
            CurrentState        = state;
            _changeStateRoutine = null;
            yield return(state.EnterState());

            state.StartProcessing();
            yield return(null);
        }
Exemple #2
0
 public void ActiveState(StateControllerBase state)
 {
     _changeStateRoutine = ChangeState(state);
     StartCoroutine(_changeStateRoutine);
 }