diff --git a/assets/sounds/move.ogg b/assets/sounds/move.ogg new file mode 100644 index 00000000..fc035509 Binary files /dev/null and b/assets/sounds/move.ogg differ diff --git a/sources/Runner/Runner.cpp b/sources/Runner/Runner.cpp index 7f45eab2..bd02ec03 100644 --- a/sources/Runner/Runner.cpp +++ b/sources/Runner/Runner.cpp @@ -79,6 +79,7 @@ namespace BBM auto scene = std::make_shared(); std::map soundPath= { {SoundComponent::JUMP, "assets/sounds/jump.wav"}, + {SoundComponent::MOVE, "assets/sounds/move.ogg"}, {SoundComponent::BOMB, "assets/sounds/bomb_drop.ogg"}, {SoundComponent::DEATH, "assets/sounds/death.ogg"} }; diff --git a/sources/System/Sound/PlayerSoundManagerSystem.cpp b/sources/System/Sound/PlayerSoundManagerSystem.cpp index 2bd4b6ab..dac45304 100644 --- a/sources/System/Sound/PlayerSoundManagerSystem.cpp +++ b/sources/System/Sound/PlayerSoundManagerSystem.cpp @@ -19,6 +19,7 @@ namespace BBM { sound.setVolume(sound.volume); std::map soundIndex = { + {health.getHealthPoint() <= 0, SoundComponent::DEATH}, {controllable.bomb, SoundComponent::BOMB}, {controllable.jump, SoundComponent::JUMP}, {controllable.move.x != 0 || controllable.move.y != 0, SoundComponent::MOVE}