feat: Implement combat and movement sound effects with looping footsteps
This commit is contained in:
@@ -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 };
|
||||
|
||||
Reference in New Issue
Block a user