Gamepad: Disable with keyboard input

This commit is contained in:
LoveEevee
2018-12-15 22:13:16 +03:00
parent 7ddda48cfe
commit 57bf7bbd8c
4 changed files with 9 additions and 0 deletions

View File

@@ -32,6 +32,9 @@ class Gamepad{
}
}
play(callback){
if(pageEvents.lastKeyEvent + 5000 > Date.now()){
return
}
if("getGamepads" in navigator){
var gamepads = navigator.getGamepads()
}else{