currently i'm developing a 2D game in my spare time and i'm confused on how to handle the input from the player.
Currently my game uses the state design pattern, each game state is a different object such as Inventory, Playing, Paused etc. All of these states implement an interface called State that have a Render and Input method that is called on whatever the "Current state" is in the game engine.
So my question is would you use multiple key listeners or key bindings, one for each state since the input the player will do differs dramatically between the different game states or would you use one key listener or keybinding somehow? Is there a best practice for this?
Thanks.