feat: Implement combat and movement sound effects with looping footsteps

This commit is contained in:
2026-01-07 20:01:58 +01:00
parent 180cf3ab94
commit 5c5cc13903
3 changed files with 52 additions and 4 deletions

View File

@@ -254,6 +254,8 @@ export class GameEngine {
const result = CombatMechanics.resolveMeleeAttack(hero, monster, this);
hero.hasAttacked = true;
if (window.SOUND_MANAGER) window.SOUND_MANAGER.playSound('sword');
if (this.onCombatResult) this.onCombatResult(result);
return { success: true, result };
@@ -309,6 +311,8 @@ export class GameEngine {
const result = CombatMechanics.resolveRangedAttack(hero, monster, this);
hero.hasAttacked = true;
if (window.SOUND_MANAGER) window.SOUND_MANAGER.playSound('arrow');
if (this.onCombatResult) this.onCombatResult(result);
return { success: true, result };