Add models, globals, persistent config, move secrets
This commit is contained in:
parent
8749e11fd0
commit
01908fbcb6
14 changed files with 129 additions and 20 deletions
|
|
@ -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)
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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):
|
||||
|
|
|
|||
|
|
@ -9,5 +9,6 @@ func _ready():
|
|||
first_selection.grab_focus()
|
||||
|
||||
func _on_back_button_pressed():
|
||||
Globals.config.save()
|
||||
last_menu.show()
|
||||
queue_free()
|
||||
|
|
|
|||
|
|
@ -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))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue