Skip to content

Commit

Permalink
feat: add background music
Browse files Browse the repository at this point in the history
  • Loading branch information
ufocoder committed Apr 14, 2024
1 parent 57e6ffa commit c009b41
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,12 @@ window.onload = async () => {
introScene.render(container);
introScene.onComplete(() => {
introScene.destroy()
soundManager.play('background');
gameScene.render(container);
});

gameScene.onComplete(() => {
soundManager.pause('background');
gameScene.destroy();
winScene.render(container);
})
Expand Down

0 comments on commit c009b41

Please sign in to comment.