virtual void SetState(State::StateType state, State* pstate);
SetState sets an interface to State. The state type is passed to SetState so that we can know which state is being cleared when null is passed.