Skip to content

Commit

Permalink
impl: start_scene
Browse files Browse the repository at this point in the history
  • Loading branch information
gnlow committed Dec 5, 2023
1 parent 494ec2b commit 8b4036f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Entry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,10 @@ export class Entry {
console.log(obj.scene)
this.on(`start_scene_${obj.scene}`, f)
}
start_scene(sceneId: string) {
this.currentScene = this.scenes[sceneId]
this.emit(`start_scene_${sceneId}`)
}
start_neighbor_scene(type: "prev" | "next") {
const currentSceneIndex = Object.values(this.scenes).findIndex(scene => scene == this.currentScene)
if (type == "prev") {
Expand Down

0 comments on commit 8b4036f

Please sign in to comment.