Can pause game

This commit is contained in:
Pierre HUBERT 2020-03-23 17:56:08 +01:00
parent 24815897e5
commit 4aebcb3f3d

View File

@ -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