chore: engine, types, demo, and UI updates

This commit is contained in:
2026-06-14 16:05:00 +08:00
parent 544f548275
commit c46c4efd6c
5 changed files with 39 additions and 17 deletions

View File

@@ -78,7 +78,7 @@ export class Engine {
this.goToScene(startScene)
}
private goToScene(scene: SceneNode) {
public goToScene(scene: SceneNode) {
this.currentScene = scene
const chapter = this.sceneManager.getChapterBySceneId(scene.id)
@@ -282,6 +282,11 @@ export class Engine {
if (this.loopActive) return
if (scene.battleResult) {
this.emit('battleResultRequest', scene.battleResult)
return
}
const validChoices = this.getValidChoices(scene)
if (validChoices.length > 0) {