From a2c5fa06d3c36ddd71d96beda79605145e061e5e Mon Sep 17 00:00:00 2001 From: BigBrotherNii Date: Wed, 24 Jul 2024 17:21:24 +0200 Subject: added lobby music --- client/audio/sound.gd | 4 +++- client/audio/sound.tscn | 4 ++++ 2 files changed, 7 insertions(+), 1 deletion(-) (limited to 'client/audio') diff --git a/client/audio/sound.gd b/client/audio/sound.gd index 13fde6a2..af23f0cd 100644 --- a/client/audio/sound.gd +++ b/client/audio/sound.gd @@ -29,7 +29,9 @@ func play_music(music : String): # If music == "stop", this stops all music for stream in music_node.get_children(): stream.stop() - if music != "stop": + if music_node.get_node(music) == null: + return + else: music_node.get_node(music).play() func set_volume(value:float): diff --git a/client/audio/sound.tscn b/client/audio/sound.tscn index a8524e71..aac5e159 100644 --- a/client/audio/sound.tscn +++ b/client/audio/sound.tscn @@ -18,3 +18,7 @@ stream = ExtResource("3_qft2s") [node name="Music" type="Node" parent="."] [node name="MainMenu" type="AudioStreamPlayer" parent="Music"] +volume_db = 1.0 + +[node name="Lobby" type="AudioStreamPlayer" parent="Music"] +volume_db = -2.5 -- cgit v1.2.3-70-g09d2