Can pause game
This commit is contained in:
parent
24815897e5
commit
4aebcb3f3d
@ -276,6 +276,9 @@ async function startGame(gameID) {
|
|||||||
document.body.addEventListener("keydown", (ev) => {
|
document.body.addEventListener("keydown", (ev) => {
|
||||||
if(["ArrowDown", "ArrowLeft", "ArrowRight", "ArrowUp"].includes(ev.key))
|
if(["ArrowDown", "ArrowLeft", "ArrowRight", "ArrowUp"].includes(ev.key))
|
||||||
key = ev.key;
|
key = ev.key;
|
||||||
|
|
||||||
|
if(ev.key == "p")
|
||||||
|
alert("Game paused. Close this dialog to resume");
|
||||||
});
|
});
|
||||||
|
|
||||||
// Automatically generate new map element if required
|
// Automatically generate new map element if required
|
||||||
|
Loading…
Reference in New Issue
Block a user