public void BeginState() { currentState.BeginState(); }
public void SwitchTo(int stateTo) { currentState.EndState(); currentState = states[stateTo](this); currentState.BeginState(); }