diff --git a/docs/assets/js/player/player.js b/docs/assets/js/player/player.js index 601cb43..67490a5 100644 --- a/docs/assets/js/player/player.js +++ b/docs/assets/js/player/player.js @@ -44,6 +44,9 @@ Player.prototype.update = function() { this.rightLeg.angle += pi; } this.shouldMoveLeg = false; + + // Play the footstep sound + soundAssets.footstep.play(); } // deselect } else { diff --git a/docs/assets/js/sounds/sounds.js b/docs/assets/js/sounds/sounds.js index 164acff..5465ed1 100644 --- a/docs/assets/js/sounds/sounds.js +++ b/docs/assets/js/sounds/sounds.js @@ -12,12 +12,14 @@ // A mapping of asset names to their files // This exists to give nicer names to files let soundAssetMap = { - "debug-ding":"./assets/sounds/debug-ding.mp3" + "debug-ding": "./assets/sounds/debug-ding.mp3", + "footstep":"./assets/sounds/footstep.mp3" } // All available sounds let soundAssets = { - debug_ding: new SoundSnippet("debug-ding", audioAssetType.sfx) + debug_ding: new SoundSnippet("debug-ding", audioAssetType.sfx), + footstep: new SoundSnippet("footstep", audioAssetType.sfx) } /** diff --git a/docs/assets/sounds/footstep.mp3 b/docs/assets/sounds/footstep.mp3 new file mode 100644 index 0000000..ea35160 Binary files /dev/null and b/docs/assets/sounds/footstep.mp3 differ