Skip to content

2 gamepads #39

Answered by juicelink77
juicelink77 asked this question in Q&A
Jan 26, 2023 · 1 comments · 1 reply
Discussion options

You must be logged in to vote

ok I found how do it :

gameControl
        .on('connect', gamepad => {
          if(gamepad.id == "0"){
            gamepad.before('button12', () => Player1UPPressed()).after('button12', () => Player1UPReleased());
            gamepad.before('button13', () => Player1DOWNPressed()).after('button13', () => Player1DOWNReleased());
            gamepad.before('button14', () => Player1LEFTPressed()).after('button14', () => Player1LEFTReleased());
            gamepad.before('button15', () => Player1RIGHTPressed()).after('button15', () => Player1RIGHTReleased());
            gamepad.before('button0', () => Player1LowKickPressed()).after('button0', () => Player1LowKickReleased());
            game…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@alvaromontoro
Comment options

Answer selected by juicelink77
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants