Quellcode durchsuchen

Gere l'audibilite de la musique

- Menu : chut
- Bruit : moins fort
DricomDragon vor 10 Monaten
Ursprung
Commit
a885d90375

+ 1 - 0
godot/composants/interface/gagne/gagne.tscn

@@ -25,6 +25,7 @@ theme_override_font_sizes/font_size = 80
 text = "Bravo !"
 
 [node name="CommandeRetour" type="Label" parent="."]
+layout_mode = 0
 offset_left = 150.0
 offset_top = 336.0
 offset_right = 330.0

+ 2 - 0
godot/composants/interface/pause/pause_menu.gd

@@ -3,6 +3,7 @@ extends Control
 
 func reprendre() -> void:
 	hide()
+	AudioServer.set_bus_effect_enabled(2,  1,false)
 	get_tree().set_pause(false)
 
 
@@ -11,6 +12,7 @@ func _unhandled_input(event: InputEvent) -> void:
 		if get_tree().is_paused():
 			reprendre()
 		else:
+			AudioServer.set_bus_effect_enabled(2, 1, true)
 			get_tree().set_pause(true)
 			show()
 

+ 1 - 0
godot/composants/objets/balle/balle.tscn

@@ -24,6 +24,7 @@ shape = SubResource("CircleShape2D_lab73")
 
 [node name="CollisionNoise" type="AudioStreamPlayer2D" parent="."]
 stream = ExtResource("3_7fm42")
+volume_db = 7.429
 bus = &"Bruits"
 
 [connection signal="rebondi" from="." to="CollisionNoise" method="play"]

+ 16 - 1
godot/default_bus_layout.tres

@@ -1,4 +1,15 @@
-[gd_resource type="AudioBusLayout" format=3 uid="uid://5582jaxf6lii"]
+[gd_resource type="AudioBusLayout" load_steps=3 format=3 uid="uid://5582jaxf6lii"]
+
+[sub_resource type="AudioEffectCompressor" id="AudioEffectCompressor_n06cg"]
+resource_name = "Compressor"
+threshold = -17.0
+ratio = 1.8
+release_ms = 60.0
+sidechain = &"Bruits"
+
+[sub_resource type="AudioEffectLowPassFilter" id="AudioEffectLowPassFilter_d204y"]
+resource_name = "LowPassFilter"
+cutoff_hz = 1000.0
 
 [resource]
 bus/1/name = &"Bruits"
@@ -13,3 +24,7 @@ bus/2/mute = false
 bus/2/bypass_fx = false
 bus/2/volume_db = 0.0
 bus/2/send = &"Master"
+bus/2/effect/0/effect = SubResource("AudioEffectCompressor_n06cg")
+bus/2/effect/0/enabled = true
+bus/2/effect/1/effect = SubResource("AudioEffectLowPassFilter_d204y")
+bus/2/effect/1/enabled = false