Ending selector, VN sequences

This commit is contained in:
2025-02-08 15:36:11 -08:00
parent 047248adb6
commit 3631144f3c
13 changed files with 470 additions and 22 deletions

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();