Ejemplo n.º 1
0
 /// <summary>
 /// Sets the current state, use with empty ctor
 /// </summary>
 /// <param name="state">state to set</param>
 public void SetState(State state)
 {
     if (state != null) state.Initialize();
     _currentState = state;
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Constructor that defines initial state
 /// </summary>
 /// <param name="initialState">initial state to set</param>
 public StateContext(State initialState)
 {
     SetState(initialState);
 }