Created
June 2, 2022 16:09
-
-
Save easierbycode/5b633d979b531610edd61e668fa8477f to your computer and use it in GitHub Desktop.
listen-for-gamepad-on-gameover
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export function addGameOverLayer() { | |
Properties.gamepad.on('down', (pad, btn, value) => { | |
console.log({ | |
pad, | |
btn, | |
value | |
}); | |
if (pad == 9) { | |
restartGame() | |
} | |
}) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment