mirror of
https://github.com/JohnBreaux/Boat-Battle.git
synced 2024-11-15 05:25:57 +00:00
Refactoring: Removed dead code
This commit is contained in:
parent
16dee66c2e
commit
737b460991
@ -3,15 +3,13 @@ extends Node
|
|||||||
# signals
|
# signals
|
||||||
# Subscribe to these if you want to be notified about changes to the volume
|
# Subscribe to these if you want to be notified about changes to the volume
|
||||||
signal change_theme (theme)
|
signal change_theme (theme)
|
||||||
signal change_mus_volume (volume)
|
|
||||||
signal change_sfx_volume (volume)
|
|
||||||
|
|
||||||
# Option variables
|
# Option variables
|
||||||
var f = File.new()
|
var f = File.new()
|
||||||
var options_file = "user://options.save"
|
var options_file = "user://options.save"
|
||||||
var theme = "dark"
|
var theme = "dark"
|
||||||
var mus_vol = 100
|
var mus_vol = 0
|
||||||
var sfx_vol = 100
|
var sfx_vol = 0
|
||||||
|
|
||||||
func _ready():
|
func _ready():
|
||||||
load_options()
|
load_options()
|
||||||
@ -25,11 +23,9 @@ func set_theme(theme_name):
|
|||||||
func set_mus_vol(volume):
|
func set_mus_vol(volume):
|
||||||
mus_vol = volume
|
mus_vol = volume
|
||||||
AudioServer.set_bus_volume_db(AudioServer.get_bus_index("BGM"), mus_vol)
|
AudioServer.set_bus_volume_db(AudioServer.get_bus_index("BGM"), mus_vol)
|
||||||
emit_signal("change_mus_volume", mus_vol)
|
|
||||||
func set_sfx_vol(volume):
|
func set_sfx_vol(volume):
|
||||||
sfx_vol = volume
|
sfx_vol = volume
|
||||||
AudioServer.set_bus_volume_db(AudioServer.get_bus_index("SFX"), sfx_vol)
|
AudioServer.set_bus_volume_db(AudioServer.get_bus_index("SFX"), sfx_vol)
|
||||||
emit_signal("change_sfx_volume", sfx_vol)
|
|
||||||
|
|
||||||
#Option Save File
|
#Option Save File
|
||||||
func save_options():
|
func save_options():
|
||||||
|
Loading…
Reference in New Issue
Block a user