aboutsummaryrefslogtreecommitdiffstats
path: root/src/Events.ts
diff options
context:
space:
mode:
authorMaksymilian Jopek <maks@jopek.eu>2023-02-27 22:35:28 +0100
committerMaksymilian Jopek <maks@jopek.eu>2023-02-27 22:35:28 +0100
commit4db4b5791cd1359519933871ab65412acafb71d7 (patch)
tree24c9b78757e23793384481691745c8d3ff0db621 /src/Events.ts
parent9f7331ca8b60cd91ee2493fa1872410c5755d1bd (diff)
download1942-4db4b5791cd1359519933871ab65412acafb71d7.tar.gz
1942-4db4b5791cd1359519933871ab65412acafb71d7.tar.zst
1942-4db4b5791cd1359519933871ab65412acafb71d7.zip
v1.1.0
Refactor of loading screen Faster loading time by concurently awaiting all promises Minor bug fix Added litle help menu at the start of the game
Diffstat (limited to 'src/Events.ts')
-rw-r--r--src/Events.ts5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/Events.ts b/src/Events.ts
index b6b09ef..dbb80a4 100644
--- a/src/Events.ts
+++ b/src/Events.ts
@@ -4,6 +4,9 @@
// up: boolean;
// down: boolean;
// fire: boolean;
+
+import { helpTxt } from "./consts";
+
// }
export const keys = {
right: false,
@@ -27,7 +30,7 @@ function setKey(key: string, val: boolean, repeat: boolean) {
else if (["a", "h"].includes(key)) { keys.left = val; keys.lastx = "left" }
else if (["s", "j"].includes(key)) { keys.down = val; keys.lasty = "down" }
else if (["d", "l"].includes(key)) { keys.right = val; keys.lastx = "right" }
- else if (["m", ";", "/"].includes(key)) { keys.fire = val; keys.repeat = repeat }
+ else if (["m", ";", "/"].includes(key)) { keys.fire = val; keys.repeat = repeat; helpTxt.style.display = "none"; }
else if ([" "].includes(key)) keys.roll = val;
// else if (["r"].includes(key)) location.reload();
// else if (["f"].includes(key)) keys.fps = 50;