Un menu!
Et on peut sauvegarder et charger la partie. Et oui mon kiki
This commit is contained in:
13
UI/menu.gd
13
UI/menu.gd
@@ -6,12 +6,23 @@ var destination_map = {
|
||||
|
||||
signal start
|
||||
signal save
|
||||
signal load
|
||||
|
||||
var instanciated_destinations = {}
|
||||
|
||||
func _ready() -> void:
|
||||
$MarginContainer/Panel/VBoxContainer/Load.disabled = not FileAccess.file_exists("user://savegame.save")
|
||||
|
||||
func _on_button_pressed() -> void:
|
||||
emit_signal("start")
|
||||
$MarginContainer/Panel/VBoxContainer/Button.text="continue"
|
||||
$MarginContainer/Panel/VBoxContainer/Start.text="Continuer"
|
||||
$MarginContainer/Panel/VBoxContainer/Save.disabled = false
|
||||
|
||||
func _on_save_pressed() -> void:
|
||||
emit_signal("save")
|
||||
$MarginContainer/Panel/VBoxContainer/Load.disabled = not FileAccess.file_exists("user://savegame.save")
|
||||
|
||||
|
||||
func _on_load_pressed() -> void:
|
||||
emit_signal("load")
|
||||
_on_button_pressed()
|
||||
|
||||
Reference in New Issue
Block a user