Example #1
0
 public StateMachine(State initialState)
 {
     CurrentState = initialState;
     CurrentState.TransitionIn();
 }
Example #2
0
 public virtual void SwitchState(State newState)
 {
     CurrentState.TransitionIn();
     CurrentState = newState;
     CurrentState.TransitionIn();
 }