Ending selector, VN sequences

This commit is contained in:
pyrex committed 2025-02-08 15:36:11 -08:00
1 parent 047248adb6
commit 3631144f3c
13 files changed
+470 -22

No files matched your search

+10
View File
@@ -111,6 +111,16 @@ class Input {
isKeyReleased(key: string) : boolean {
return !this.#keyDown[key] && this.#previousKeyDown[key];
}
isAnythingPressed(): boolean {
for (let k of Object.keys(this.#keyDown)) {
if (this.#keyDown[k] && !this.#previousKeyDown[k]) { return true }
}
for (let k of Object.keys(this.#mouseDown)) {
if (this.#mouseDown[k] && !this.#previousMouseDown[k]) { return true }
}
return false;
}
}
let active = new Input();