refactor: tighten core seams and spawning

This commit is contained in:
2026-06-18 18:34:45 +03:00
parent 58bf96e9d9
commit b7362a2ad8
11 changed files with 222 additions and 24 deletions
+2 -2
View File
@@ -1,4 +1,4 @@
import type { InputState } from './InputState';
import type { InputSource, InputState } from './InputState';
import type { Dir } from '../core/types';
/**
@@ -14,7 +14,7 @@ import type { Dir } from '../core/types';
* (смена оружия/рестарт). Раз в кадр вызывается poll(), который собирает
* InputState и сбрасывает однократные флаги.
*/
export class KeyboardController {
export class KeyboardController implements InputSource {
private held = new Set<string>();
private toggleWeaponEdge = false;
private restartEdge = false;