I hope the title makes sense. Basically, I am trying to figure out how the app will know I the input I am sending it is meant for the app and not the player, and vice-versa.
(It is very similar to this question, A pattern for a contextual InputState in a Game State Management architecture)
This is an idea I've had, but it's flawed. Any suggestions?
There will be a class to gather input, called
Another class will register the IOManager, called
Various subclasses of the
IOHandler will handle the output differently. For example,
IOPauseState will handle input differently than
My problem comes with differentiating between the "GameStates" and the "Player" when handling the IO. I could have two separate HandleInput functions in the IOHandler class; one that accepts a reference to a state and another that accepts a reference to the player, but that does not seem right.
How should I go about handling this, when I can't really subscribe them or pass them through because the player and the gamestates are two completely separate classes?