Add models, globals, persistent config, move secrets

This commit is contained in:
Manuel 2023-10-02 20:42:44 +02:00
parent 8749e11fd0
commit 01908fbcb6
Signed by: Manuel
GPG key ID: 4085037435E1F07A
14 changed files with 129 additions and 20 deletions

View file

@ -6,7 +6,7 @@ extends Control
@export var distance: Label
func _on_player_speed_changed(speed_float:float):
var speed_string = "%.f" % speed_float
var speed_string = "%.f" % (speed_float / 10)
# print_debug("changing speed display to ", speed_string)
speed.set_text(speed_string)

View file

@ -6,3 +6,4 @@ func _ready():
func _on_value_changed(value):
print_debug("setting brightness to ", value)
GlobalWorldEnvironment.environment.adjustment_brightness = value
Globals.config.Brightness = value

View file

@ -9,7 +9,12 @@ extends Control
# Called when the node enters the scene tree for the first time.
func _ready():
first_selection.grab_focus()
var err = Globals.config.load()
if err:
print("Config does not yet exist, skipping load")
else:
print("Config loaded successfully")
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta):

View file

@ -9,5 +9,6 @@ func _ready():
first_selection.grab_focus()
func _on_back_button_pressed():
Globals.config.save()
last_menu.show()
queue_free()

View file

@ -12,3 +12,4 @@ func _ready() -> void:
func _on_value_changed(value: float) -> void:
AudioServer.set_bus_volume_db(bus_index, linear_to_db(value))
#Globals.config.setVolume(bus_index, linear_to_db(value))