diff options
author | niliara-edu <nil.jimeno@estudiant.fjaverianas.com> | 2024-12-24 17:58:20 +0100 |
---|---|---|
committer | niliara-edu <nil.jimeno@estudiant.fjaverianas.com> | 2024-12-24 17:58:20 +0100 |
commit | 25adfc618e77db9a5ee3b98ce0dab0be832efed0 (patch) | |
tree | 36ca56758ddd4674ab5a43df4b76bbfcc5a47af1 /src/engine/keyboard.js | |
parent | a840990bdcabf45fb0d377478ba0ab27222434ae (diff) |
hello kitty base done
Diffstat (limited to 'src/engine/keyboard.js')
-rw-r--r-- | src/engine/keyboard.js | 3 |
1 files changed, 3 insertions, 0 deletions
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; } } |