From 25adfc618e77db9a5ee3b98ce0dab0be832efed0 Mon Sep 17 00:00:00 2001 From: niliara-edu Date: Tue, 24 Dec 2024 17:58:20 +0100 Subject: hello kitty base done --- src/engine/keyboard.js | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/engine/keyboard.js') diff --git a/src/engine/keyboard.js b/src/engine/keyboard.js index d634519..3a9c39e 100644 --- a/src/engine/keyboard.js +++ b/src/engine/keyboard.js @@ -1,3 +1,5 @@ +import { SCENE, SCENES } from "../scenes.js" + export function setUpKeyboard() { document.addEventListener("keyup", k => trigger(k)) document.addEventListener("keydown", k => trigger(k)) @@ -19,5 +21,6 @@ function trigger(event) { case "ArrowUp": keys.up = on; break; case "ArrowDown": keys.down = on; break; case "z": case "Z": keys.shoot = on; break; + case "r": case "R": if (on) SCENE.load(SCENES.PREQUEL); break; } } -- cgit v1.2.3