Beispiel #1
0
 public void ChangeState(State newState)
 {
     if (currentState != null)
     {
         currentState.exit();
     }
     currentState = newState;
     currentState.enter(this);
 }