-
Notifications
You must be signed in to change notification settings - Fork 32
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
Implement Input Mapping #52
Conversation
0689660
to
c4f5c87
Compare
8f64df8
to
04d2d87
Compare
@odecay this is ready for review now. It replaces all game input with mapable actions in three categories: You can also play two players, now, though I believe there's a weird bug where the second player cannot move while the first player is flopping. I haven't investigated yet, but I think we can fix that after this PR. I'm going to follow up with a PR to allow you to navigate the menus with the gamepad, and then after that I'll look into getting two players working without issue. |
Maybe its because of something I did in state checking for that system? Using return instead of break? https://github.com/fishfight/punchy/blob/0060a90bd2fed813a0bf5ae06593ec0b914a5ed1/src/main.rs#L664 |
Awesome! Review + merge will be my first priority after the v0.0.2 release is up today.
👍 Sounds good! |
- Single: | ||
GamepadButton: East | ||
|
||
camera: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i like the defaults here for camera movement
@@ -12,6 +12,161 @@ main_menu: | |||
image: ui/main-menu-background.png | |||
image_size: [1919, 1027] | |||
|
|||
default_input_maps: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very nice how clean it is to have analogs + dpad + keyboard all share input maps
#TODO turn this into a debug feature | ||
[patch.crates-io] | ||
# Patch to enable improved DPad support. It's a merge of the following PR to Bevy 0.7.0 so we can | ||
# use it before 0.8 is release: https://github.com/bevyengine/bevy/pull/5220. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
checked out the patch, looks relatively simple lets hope it gets merged 👍
Here's two players controlled both with gamepads, and keyboard controls work too!