diff --git a/assets/music/bgMusic.mp3 b/assets/music/bgMusic.mp3 new file mode 100644 index 0000000..cd126c2 Binary files /dev/null and b/assets/music/bgMusic.mp3 differ diff --git a/src/scenes/Game.js b/src/scenes/Game.js index c9bc317..23a1373 100644 --- a/src/scenes/Game.js +++ b/src/scenes/Game.js @@ -22,10 +22,15 @@ export class Game extends Phaser.Scene { frameHeight: 100 }); + // Images this.load.image('terrain-tileset', 'assets/images/terrain.png'); this.load.image('backpack', 'assets/images/backpack.png'); + // Fonts this.load.font('eraserDust', 'assets/fonts/EraserDust.ttf'); + + // Music + this.load.audio('bgMusic', 'assets/music/bgMusic.mp3'); } create() { @@ -89,6 +94,11 @@ export class Game extends Phaser.Scene { // Initialize cycle manager this.cycleManager = new CycleManager(this); this.cycleManager.init(); + + // Background Music + this.bgMusic = this.sound.add('bgMusic', { volume: 0.5 }); + this.bgMusic.loop = true; + this.bgMusic.play(); } update(time, delta) {