From 07520324cb88dba77cb1a20ae51bb059aaf324c8 Mon Sep 17 00:00:00 2001 From: Chris Cromer Date: Sun, 28 Aug 2022 01:54:45 -0400 Subject: [PATCH 1/2] lower default volume --- godot/characters/player/Player.tscn | 1 + godot/levels/Level2.tscn | 1 + 2 files changed, 2 insertions(+) diff --git a/godot/characters/player/Player.tscn b/godot/characters/player/Player.tscn index 89b38d9..bbd2fc2 100644 --- a/godot/characters/player/Player.tscn +++ b/godot/characters/player/Player.tscn @@ -52,3 +52,4 @@ collision_mask = 24 [node name="Jump" type="AudioStreamPlayer" parent="Sounds"] stream = ExtResource( 8 ) +volume_db = -45.0 diff --git a/godot/levels/Level2.tscn b/godot/levels/Level2.tscn index 811360b..8454136 100644 --- a/godot/levels/Level2.tscn +++ b/godot/levels/Level2.tscn @@ -45,4 +45,5 @@ script = ExtResource( 1 ) [node name="AudioStreamPlayer" type="AudioStreamPlayer" parent="."] pause_mode = 2 stream = ExtResource( 5 ) +volume_db = -35.0 script = ExtResource( 6 ) -- 2.30.2 From b9570c5f161d3de68701f73254fd6495b821ad0b Mon Sep 17 00:00:00 2001 From: Chris Cromer Date: Sun, 28 Aug 2022 01:57:37 -0400 Subject: [PATCH 2/2] play jump sound when bouncing on enemy --- src/player/Player.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/player/Player.cpp b/src/player/Player.cpp index f3abf4f..d60cc1d 100644 --- a/src/player/Player.cpp +++ b/src/player/Player.cpp @@ -2,6 +2,7 @@ #include "Event.h" +#include #include #include #include @@ -129,6 +130,8 @@ void alai::player::Player::_physics_process(float delta) WARN_PRINT("Enemies not found!"); dup->queue_free(); }*/ + auto jump_sound = get_parent()->get_node("Sounds/Jump"); + jump_sound->play(); velocity.y = -get_bounce_force(); } else if (collider->is_in_group("enemy") && (collider->is_in_group("rideable") && godot::Vector2::DOWN.dot(collision->get_normal()) > 0)) -- 2.30.2