I am trying to make an
InputManager class that will let me basically bridge XNA's various input methods and do a corresponding action in my game. Part of this is designing different keybindings.
Suppose I have a class
GamePadBinding : InputBinding<Button> - this is the
Button enum from XNA.Input and has a variety of different buttons (Left, A, etc). However, to actually check input, I have to call something like
if (GamePad.GetState(PlayerIndex.One).DPad.Left == ButtonState.Pressed), and the problem with that is that it uses a struct with readonly values.
How am I expected to store an enum of type
Button and compare that with this? I really am not seeing the point of this enum.