public void TransitionTo(State state)
 {
     Console.WriteLine($"Context: Transition to {state.GetType().Name}");
     this._state = state;
     this._state.SetContext(this);
 }
Esempio n. 2
0
 public void TransitionTo(State state)
 {
     Debug.WriteLine($"Context: Transition to {state.GetType().Name}.");
     this.State = state;
     this.State.SetContext(this);
 }
Esempio n. 3
0
 public void setState(State state)
 {
     current = state;
     Console.WriteLine("State: " + current.GetType().Name);
 }