public void ChangeState(string newState) { currentState.Leave(); currentState = states[newState]; currentStateName = newState; currentState.Enter(null); }