working settings menu
includes audio sliders, fullscreen, disabling gravity change sound
This commit is contained in:
parent
eefda9e2bd
commit
a73b32610e
9 changed files with 197 additions and 4 deletions
|
@ -15,6 +15,7 @@ func _ready() -> void:
|
|||
AudioServer.add_bus()
|
||||
AudioServer.set_bus_name(AudioServer.bus_count - 1, self.name)
|
||||
bus_index = AudioServer.get_bus_index(self.name)
|
||||
changeVolume(0)
|
||||
|
||||
var current_effects = AudioServer.get_bus_effect_count(bus_index)
|
||||
for i in current_effects:
|
||||
|
@ -36,7 +37,8 @@ func _ready() -> void:
|
|||
instrument.play()
|
||||
|
||||
func changeVolume(db: float) -> void:
|
||||
AudioServer.set_bus_volume_db(bus_index, db)
|
||||
AudioServer.set_bus_volume_db(bus_index, db + Settings.volume_music)
|
||||
AudioServer.set_bus_mute(bus_index, Settings.volume_music <= -15.0)
|
||||
|
||||
func adaptInstrumentsToVelocity(velocity: float, delta: float) -> void:
|
||||
var instruments_needed = floor(velocity / 8)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue