Bug "multi-pause" fixed
This commit is contained in:
parent
c2a2770964
commit
580e31a796
@ -326,6 +326,8 @@ async function startGame(gameID) {
|
|||||||
|
|
||||||
// Listen for key press events
|
// Listen for key press events
|
||||||
document.body.addEventListener("keydown", (ev) => {
|
document.body.addEventListener("keydown", (ev) => {
|
||||||
|
if(!canvas.isConnected)
|
||||||
|
return;
|
||||||
if(["ArrowDown", "ArrowLeft", "ArrowRight", "ArrowUp"].includes(ev.key))
|
if(["ArrowDown", "ArrowLeft", "ArrowRight", "ArrowUp"].includes(ev.key))
|
||||||
key = ev.key;
|
key = ev.key;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user