StateManager for states e.g. in games