Add exit feedback and restyle pressed button state

This commit is contained in:
Henry 2025-10-12 15:46:06 +01:00
parent 49988ae674
commit e3f2be7e4d
3 changed files with 39 additions and 25 deletions

View file

@ -4,5 +4,7 @@ func _ready():
set_process(true)
func _process(_delta):
if Input.is_action_pressed("key_exit"):
get_tree().change_scene_to_file("res://scenes/Start.tscn")
if Input.is_action_pressed("key_exit"):
$message_exit.text = "Exiting to main menu…"
await get_tree().create_timer(2).timeout
get_tree().change_scene_to_file("res://scenes/Start.tscn")