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

final version of settings, everything works

parent 9f7f5e62
Branches
Tags
1 merge request!6Figma team
extends Node
@onready var sounds = {
"UI_Hover": AudioStreamPlayer.new(),
"UI_Click": AudioStreamPlayer.new(),
......@@ -26,5 +28,5 @@ func install_sounds(node: Node) -> void:
install_sounds(child)
func ui_sfx_play(sound: String) -> void:
if sound in sounds:
if sound in sounds and Config.button_check==true:
sounds[sound].play()
extends Node
var volume_value: float = -10.0 # Valeur par défaut du volume
var button_check=true
......@@ -35,6 +35,6 @@ func _on_check_button_music_toggled(toggled_on: bool) -> void:
func _on_check_button_button_sound_toggled(toggled_on: bool) -> void:
if toggled_on==false:
AudioServer.set_bus_mute(AudioServer.get_bus_index("Sfx"),true)
Config.button_check=false
else:
AudioServer.set_bus_mute(AudioServer.get_bus_index("Sfx"),false)
Config.button_check=true
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