-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
XboxControllerHandlerBase fixes #1521
XboxControllerHandlerBase fixes #1521
Conversation
Fixes an issue where it'd get stuck in a HoldStarted or HoldCompletedState, due to incorrect logic in cancelling coroutines. I also removed several states that really didn't mean anything, along with removing the tracking bools that duplicated the GestureState enum.
} | ||
|
||
if (XboxControllerMapping.GetButton_Up(SelectButton, eventData)) | ||
if (eventData.XboxA_Up) |
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.
this removes the customization of the selection buttons
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.
Ahh yes, this was left over from when I was investigating the double events. Reverting.
@@ -25,9 +25,8 @@ public class XboxControllerHandlerTest : XboxControllerHandlerBase | |||
private Vector3 newPosition; | |||
private Vector3 newRotation; | |||
|
|||
protected override void Start() | |||
private void Start() |
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.
We should probably make this protected virtual
in case someone wants to add onto the functionality of this class
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.
Since it's a test class, I feel like that's unlikely, but I'll change it.
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.
Good point
Overview
Simplified the state machine in
XboxControllerHandlerBase
to reduce confusion and cases where states may conflict with each other.Also resolved a bug where
GamePadHandlerBase
was registering as a global listener twice, thus receiving all events from theInputManager
twice.Changes