Skip to content

Commit

Permalink
fix: start only current scene
Browse files Browse the repository at this point in the history
  • Loading branch information
gnlow committed Dec 30, 2023
1 parent f319746 commit ae361b8
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/Entry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ export class Entry {
this.events[eventName].push(f)
}
start() {
this.emit("start")
this.emit(`run_scene_${this.currentScene.label}`)
}
render() {
this.renderer!.render({
Expand All @@ -252,8 +252,11 @@ export class Entry {
}

/* 시작 */
when_run_button_click(f: () => Promise<void>) {
this.on("start", f)
when_run_button_click(
f: () => Promise<void>,
obj: EntryContainer,
) {
this.on(`run_scene_${obj.scene}`, f)
}
when_some_key_pressed(keyCode: string, f: () => Promise<void>) {
document.body.addEventListener("keydown", e => {
Expand Down

0 comments on commit ae361b8

Please sign in to comment.