Add music and voice assets

This commit is contained in:
2026-06-22 00:21:45 +09:00
parent 674fbe6659
commit e45ad9e5ea
26 changed files with 652 additions and 50 deletions

View File

@@ -17,8 +17,15 @@ export class TitleScene extends Phaser.Scene {
this.drawTitleMark(width, height);
this.drawMenu(width, height);
this.input.once('pointerdown', () => soundDirector.start());
this.input.keyboard?.once('keydown', () => soundDirector.start());
soundDirector.playMusic('title-theme');
const unlockAudio = () => {
soundDirector.start();
soundDirector.resume();
soundDirector.playMusic('title-theme');
};
this.input.once('pointerdown', unlockAudio);
this.input.keyboard?.once('keydown', unlockAudio);
this.input.keyboard?.once('keydown-ENTER', () => this.startGame());
}
@@ -275,6 +282,8 @@ export class TitleScene extends Phaser.Scene {
}
private startGame() {
soundDirector.start();
soundDirector.resume();
soundDirector.playSelect();
this.scene.start('StoryScene');
}