added start menu and wait screen
This commit is contained in:
@ -3,13 +3,10 @@ extends PanelContainer
|
||||
@export var profile_name: LineEdit
|
||||
@export var enter_button: TextureButton
|
||||
|
||||
var save: SaveFile
|
||||
|
||||
|
||||
func _ready() -> void:
|
||||
save = SaveFile.load_profile_from_disk()
|
||||
if save.catfish_name:
|
||||
profile_name.text = save.catfish_name
|
||||
if Data.save_file.catfish_name:
|
||||
profile_name.text = Data.save_file.catfish_name
|
||||
enter_button.visible = true
|
||||
|
||||
|
||||
@ -19,12 +16,11 @@ func _on_texture_button_pressed() -> void:
|
||||
|
||||
func load_game() -> void:
|
||||
if profile_name.text.length() > 0:
|
||||
save.catfish_name = profile_name.text
|
||||
save.save_to_disk()
|
||||
Data.save_file.catfish_name = profile_name.text
|
||||
get_tree().change_scene_to_file("res://Quinnsoft94/desktop.tscn")
|
||||
|
||||
|
||||
func _on_line_edit_text_submitted(new_text: String) -> void:
|
||||
func _on_line_edit_text_submitted(_new_text: String) -> void:
|
||||
load_game()
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user