Skip to content

Commit 82ba161

Browse files
committed
Properly delete idle mode player.
Fixes a bug where the idle mode game still remains playing.
1 parent 1febbd3 commit 82ba161

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/nodes/IdleMode.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ export default class IdleMode extends GameNode {
7676
endIdle() {
7777
this.music?.stop();
7878
document.removeEventListener("keydown", this.handleKeyDown);
79+
this.player.destroy();
7980
this.onFinish?.();
8081
}
8182

0 commit comments

Comments
 (0)