- QTESystem: add if (!this.active) return guard in setInterval/setTimeout
callbacks to prevent false result from firing after successful key press
- SaveLoadMenu: restore auto-save slot 0 row with blue styling, thumbnail,
scene label, and read-only load button
Previously onTimeCallback was a single nullable function pointer, so
registerEvents()'s store.setVideoTime callback was overwritten by
goToScene()'s checkQTE callback, causing videoTime to stay at 0.
Changed to a Set to support multiple concurrent listeners.
Previously maxLimit was passed directly to setTimeout/setInterval (ms),
so a JSON value of 10 meant 10ms instead of the intended 10 seconds.
Now timeLimit in JSON represents seconds, engine multiplies by 1000.
The first onUpdate call used raw milliseconds (e.g. total: 10000),
while subsequent ticks used seconds (total: 10). This caused the
progress bar to jump on the first interval tick.
- useGameEngine: auto-save to slot 0 on every sceneChange event
- useGameEngine: add resumeAutoSave() for continuing from auto-save
- useGameEngine: extract registerEvents() to share between start and resume
- SaveLoadMenu: show slot 0 as '自动存档' with distinct styling and read-only button
- App.vue: check auto-save on load, show '继续上次进度' button if available
- StateManager.dump(): console.table formatted dump of variables, flags, history
- window.__sm: exposes engine.stateManager in dev mode for console inspection
- VideoManager: A/B dual-buffered video with crossfade transitions and candidate preloading
- Engine: condition-based choice filtering, ChoiceSystem timer, resumeScene for save/load
- SceneManager: getCandidateUrls for preloading next scenes
- SaveSystem: Dexie.js IndexedDB multi-slot save/load
- ChoiceSystem: timed choices with countdown and auto-default on timeout
- GamePlayer: dual video elements with crossfade CSS
- ChoicePanel: timer progress bar and countdown text
- SaveLoadMenu: save/load UI component
- App.vue: menu trigger, dual video refs, save/load integration
- gameStore: timer state, saves list
- demo.json: conditional choice example (secret ending, requires trust >= 80)
- ROADMAP: mark P1 as completed
Replace auto-start after loading with a '开始游戏' button overlay.
The user click provides the required user gesture for autoplay with sound,
fixing the issue where play() was silently rejected and choices never appeared.
- Reorder onEnd callback before play() in Engine.goToScene to prevent
missed ended event if video ends synchronously
- Wait for loadedmetadata event in VideoManager.play() before seeking
to ensure currentTime reset works correctly on new video sources