feat: Automated Audio System & Royalty-Free Asset Integration (Phase 8 & 9)

- Added footstep_grass.wav, wood_chop.wav, forest_ambient.mp3
- Synchronized rhythm footsteps with walk animation frames
- Implemented proximity-based pond music modulation
- Updated SoundManager to prioritize high-quality assets
This commit is contained in:
2025-12-28 00:52:33 +01:00
parent 822c586843
commit c8743986ad
7 changed files with 4540 additions and 21 deletions

View File

@@ -450,6 +450,23 @@ class Player {
if (this.sprite.anims.currentAnim) {
this.sprite.anims.currentAnim.frameRate = frameRate;
}
// 🔉 PHASE 8: Footstep triggers (frames 1 and 3 are usually down-steps)
const currentFrame = this.sprite.anims.currentFrame ? this.sprite.anims.currentFrame.index : 0;
if ((currentFrame === 1 || currentFrame === 3) && this.lastFootstepFrame !== currentFrame) {
if (this.scene.soundManager) {
// Determine surface
let surface = 'grass';
if (this.scene.terrainSystem && this.scene.terrainSystem.getTile) {
const tile = this.scene.terrainSystem.getTile(this.gridX, this.gridY);
if (tile && tile.type === 'dirt') surface = 'dirt';
}
this.scene.soundManager.playFootstep(surface);
}
this.lastFootstepFrame = currentFrame;
} else if (currentFrame !== 1 && currentFrame !== 3) {
this.lastFootstepFrame = -1;
}
}
}
@@ -773,6 +790,8 @@ class Player {
const used = this.scene.statusEffectSystem.applyEffect('high');
if (used) {
invSys.removeItem(slot.type, 1);
// Audio feedback
if (this.scene.soundManager) this.scene.soundManager.playSmokeSound();
// Visual feedback
this.createSmokeParticles(this.gridX, this.gridY);
this.scene.events.emit('show-floating-text', {