I'm new to C Sharp, and writing a game w/ the XNA Framework.
I'm trying to establish variables for the buttons on the XBox 360 controller, so I can reconfigure the buttons' game functions in one place and not have to change direct references to the buttons everywhere.
So if I want to assign a button to "attack", instead of this:
if (gamePadState.IsButtonDown(Buttons.B)
{
// do game logic
}
I want to do this:
if (gamePadState.IsButtonDown(MyAttackButton)
{
// do game logic
}
Any ideas? I'm sure it's a very simple solution, but I've tried several approaches and none have worked yet. Thanks!