Add secondary buttons for jump & attack

GitOrigin-RevId: adac7b3aa185e10e8cf86046f8a88817c300ef36
This commit is contained in:
Colin McMillen 2020-01-16 17:16:45 -05:00
parent bbdc3c3053
commit a719e5b370

View File

@ -13,8 +13,10 @@ namespace SemiColinGames {
public Input(GamePadState gamePad, KeyboardState keyboard) { public Input(GamePadState gamePad, KeyboardState keyboard) {
// First we process normal buttons. // First we process normal buttons.
Jump = gamePad.IsButtonDown(Buttons.A) || keyboard.IsKeyDown(Keys.J); Jump = gamePad.IsButtonDown(Buttons.A) || gamePad.IsButtonDown(Buttons.B) ||
Attack = gamePad.IsButtonDown(Buttons.X) || keyboard.IsKeyDown(Keys.K); keyboard.IsKeyDown(Keys.J);
Attack = gamePad.IsButtonDown(Buttons.X) || gamePad.IsButtonDown(Buttons.Y) ||
keyboard.IsKeyDown(Keys.K);
// Then special debugging sorts of buttons. // Then special debugging sorts of buttons.
Exit = gamePad.IsButtonDown(Buttons.Start) || keyboard.IsKeyDown(Keys.Escape); Exit = gamePad.IsButtonDown(Buttons.Start) || keyboard.IsKeyDown(Keys.Escape);