Completed profile meta save/load + legit check by hash

This commit is contained in:
gotfishmakesticks 2023-11-08 09:49:00 +03:00
commit 94ee27472c
3 changed files with 52 additions and 19 deletions

View file

@ -2,6 +2,7 @@ extends Node2D
var map_width = 1280
var map_height = 720
var menu_id = 0
@onready var b1 = $Control/MenuButton1
@onready var b2 = $Control/MenuButton2
@onready var b3 = $Control/MenuButton3
@ -36,3 +37,4 @@ func change_menu(id):
b3.change_name()
b4.change_name()
b5.change_name()
menu_id = id

View file

@ -2,7 +2,7 @@ extends Button
@export var id = "Null"
@onready var сontroller = $"../.."
@onready var controller = $"../.."
func _ready():
button_up.connect(_on_button_up)
@ -15,9 +15,16 @@ func _on_button_up():
"CreateProfile":
Game.profile_create("1")
"LoadProfile":
Game.profile_load("1")
Game.profile_legit_check(Game.profile_load("1"))
"DeleteProfile":
Game.profile_delete("1")
"ExitGame":
get_tree().quit()
"Profiles":
controller.change_menu(1)
"Back":
var new_menu_id = 0
controller.change_menu(new_menu_id)
func change_name():
visible = true