-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Gamepad rework #16
Gamepad rework #16
Conversation
Keymap is no longer needed to create our Gamepad object, i should clear those 1 and 0 from operator and dweller. |
Also, the keymap on Gamepad.js is no longer needed, i moved it to a separate file. |
Keyboard gamepads aren't being swapped. #18 |
PS4 controller input is not being detected/processed. #20 |
Added justPressed helper for controller buttons. Currently missing support for Keyboard keys and controller axes.
I refactored most of the classes in I've also added the I believe we should be splitting keymap buttons into |
Can't control the second player with keyboard only #23 |
I think this is working atleast as good as it was before changing the gamepad object! |
Improved the `keyPressed` function to use a specific check function for each type of input. Changed keymap axes format: * Axis objects must now define each direction independently. * Axis object is now an object containing the axis and direction. * Direction is now included in the game key axis configuration. It does not need to be included in the `keyPressed` call anymore.
I've included the changes to the new keymap format and added I believe the rework is done. If my latest commits are reviewed and approved we can merge this PR. |
It needs some more love/cleanup, looking for feedback, there's an issue for when you disconnect a pad and connect a different pad we should handle that somehow.