diff options
author | metamuffin <metamuffin@disroot.org> | 2024-07-25 17:11:46 +0200 |
---|---|---|
committer | metamuffin <metamuffin@disroot.org> | 2024-07-25 17:11:46 +0200 |
commit | 3403fc2d55f510c29bf7e74d85433801cd99cbbc (patch) | |
tree | 4f7ba54dd3ad86dd2c0dc6cb9a59ff68a704213b /client/audio | |
parent | a8ce0f8cf64a89c18cbb08dd10f2b2d9b22ad56f (diff) | |
parent | d292432a6b09a9d19659784d67faa410dac3ee18 (diff) | |
download | hurrycurry-3403fc2d55f510c29bf7e74d85433801cd99cbbc.tar hurrycurry-3403fc2d55f510c29bf7e74d85433801cd99cbbc.tar.bz2 hurrycurry-3403fc2d55f510c29bf7e74d85433801cd99cbbc.tar.zst |
Merge branch 'master' of codeberg.org:hurrycurry/hurrycurry
Diffstat (limited to 'client/audio')
-rw-r--r-- | client/audio/sound.gd | 8 | ||||
-rw-r--r-- | client/audio/sound.tscn | 4 |
2 files changed, 8 insertions, 4 deletions
diff --git a/client/audio/sound.gd b/client/audio/sound.gd index af23f0cd..90f1ef1e 100644 --- a/client/audio/sound.gd +++ b/client/audio/sound.gd @@ -34,13 +34,13 @@ func play_music(music : String): # If music == "stop", this stops all music else: music_node.get_node(music).play() -func set_volume(value:float): - AudioServer.set_bus_volume_db(0, value) +func set_volume(bus : int, value:float): + AudioServer.set_bus_volume_db(bus, value) if value == -30: - AudioServer.set_bus_mute(0, true) + AudioServer.set_bus_mute(bus, true) else: - AudioServer.set_bus_mute(0, false) + AudioServer.set_bus_mute(bus, false) func play_click(): click_sound.play() diff --git a/client/audio/sound.tscn b/client/audio/sound.tscn index f80a1927..5fd759ce 100644 --- a/client/audio/sound.tscn +++ b/client/audio/sound.tscn @@ -11,14 +11,18 @@ script = ExtResource("1_b0qb1") [node name="Click" type="AudioStreamPlayer" parent="UI"] stream = ExtResource("2_mhrce") +bus = &"SFX" [node name="Hover" type="AudioStreamPlayer" parent="UI"] stream = ExtResource("3_qft2s") +bus = &"SFX" [node name="Music" type="Node" parent="."] [node name="MainMenu" type="AudioStreamPlayer" parent="Music"] volume_db = 1.0 +bus = &"Music" [node name="Lobby" type="AudioStreamPlayer" parent="Music"] volume_db = -3.5 +bus = &"Music" |