From 2f278d36afd79efafaa5ed08ef123789b5563680 Mon Sep 17 00:00:00 2001 From: Max-001 Date: Mon, 6 Jan 2025 15:52:40 +0100 Subject: Added footstep sound --- game/player/PlayerSubScene.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'game/player/PlayerSubScene.cpp') diff --git a/game/player/PlayerSubScene.cpp b/game/player/PlayerSubScene.cpp index c1e5e2f..11575c6 100644 --- a/game/player/PlayerSubScene.cpp +++ b/game/player/PlayerSubScene.cpp @@ -1,10 +1,12 @@ #include "PlayerSubScene.h" +#include "PlayerAudioScript.h" #include "PlayerEndScript.h" #include "PlayerScript.h" #include "../Config.h" #include +#include #include #include #include @@ -150,4 +152,17 @@ PlayerSubScene::PlayerSubScene(Scene & scn) { }); player.add_component().set_script().active = false; player.add_component().set_script().active = false; + + GameObject player_audio = scn.new_object("player_audio", "player_audio", vec2(0, 0)); + player_audio.add_component(Asset("asset/sfx/barefoot_step_left_1.ogg")); + player_audio.add_component(Asset("asset/sfx/barefoot_step_right_1.ogg")); + player_audio.add_component(Asset("asset/sfx/barefoot_step_left_2.ogg")); + player_audio.add_component(Asset("asset/sfx/barefoot_step_right_2.ogg")); + player_audio.add_component(Asset("asset/sfx/barefoot_step_left_3.ogg")); + player_audio.add_component(Asset("asset/sfx/barefoot_step_right_3.ogg")); + player_audio.add_component(Asset("asset/sfx/barefoot_step_left_4.ogg")); + player_audio.add_component(Asset("asset/sfx/barefoot_step_right_4.ogg")); + + player_audio.add_component().set_script().active + = false; } -- cgit v1.2.3