Skip to content
Snippets Groups Projects
Commit 8723f894 authored by BARBUTOV FILIP's avatar BARBUTOV FILIP
Browse files

sound button settings

parent 6888132a
Branches
Tags
1 merge request!6Figma team
extends Node
var volume_value: float = -10.0 # Valeur par défaut du volume
extends Node2D
func _ready():
AudioServer.set_bus_volume_db(AudioServer.get_bus_index("BGMusic"), Config.volume_value)
func make_visible(ismenu) -> void:
self.set_visible(true)
......@@ -14,4 +20,6 @@ func _on_button_2_pressed() -> void:
func _on_h_slider_value_changed(value: float) -> void:
Config.volume_value = value # Modifie la valeur du volume dans le script autoload
AudioServer.set_bus_volume_db(AudioServer.get_bus_index("BGMusic"), value)
print(value)
......@@ -94,7 +94,7 @@ offset_right = 845.8
offset_bottom = 285.105
scale = Vector2(1, 2)
min_value = -80.0
max_value = -20.0
max_value = -10.0
value = -20.0
[node name="Title_setting" type="RichTextLabel" parent="PopupSettings"]
......
[gd_resource type="AudioBusLayout" format=3 uid="uid://cfo2847014soa"]
[resource]
bus/0/volume_db = 0.0672607
bus/1/name = &"BGMusic"
bus/1/solo = false
bus/1/mute = false
......
......@@ -13,6 +13,7 @@ config_version=5
config/name="godot_project"
run/main_scene="res://GameStarter/HomePage.tscn"
config/features=PackedStringArray("4.3", "GL Compatibility")
boot_splash/autoload_on_startup=false
[autoload]
......@@ -20,6 +21,7 @@ Global="*res://global.gd"
Notification="*res://sprite/notification.tscn"
UISounds="*res://Game/scripts/ui_sounds.gd"
MusicPlayer="*res://GameStarter/MusicPlayer.tscn"
Config="*res://GameStarter/Config.gd"
[display]
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment