mirror of
https://github.com/PfandBoss/SemesterGameJam2022.git
synced 2025-11-12 04:16:12 +01:00
21 lines
521 B
GDScript
21 lines
521 B
GDScript
extends HSlider
|
|
|
|
var master_bus = AudioServer.get_bus_index("Master")
|
|
|
|
# Called when the node enters the scene tree for the first time.
|
|
func _ready():
|
|
pass # Replace with function body.
|
|
|
|
|
|
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
|
func _process(delta):
|
|
pass
|
|
|
|
|
|
func _on_value_changed(value):
|
|
AudioServer.set_bus_volume_db(master_bus, value)
|
|
if value == -30:
|
|
AudioServer.set_bus_mute(master_bus, true)
|
|
else:
|
|
AudioServer.set_bus_mute(master_bus,false) # Replace with function body.
|