chore: engine, types, demo, and UI updates
This commit is contained in:
@@ -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) {
|
||||
|
||||
@@ -157,6 +157,7 @@ export type EngineEvent =
|
||||
| 'hotspotUpdate'
|
||||
| 'chapterUnlock'
|
||||
| 'achievementUnlock'
|
||||
| 'battleResultRequest'
|
||||
|
||||
export interface PlayerTreeNode {
|
||||
sceneId: string
|
||||
|
||||
Reference in New Issue
Block a user