chore: added exit button to game

This commit is contained in:
2026-03-15 21:12:16 +01:00
parent 80f2860ba1
commit aae15b0b50
3 changed files with 19 additions and 0 deletions

14
Assets/Quit.gd Normal file
View File

@@ -0,0 +1,14 @@
extends Node
class_name QuitGame
@onready var button: Button = get_parent() as Button
func _ready() -> void:
button.pressed.connect(_on_button_pressed)
button.name = button.text
func _on_button_pressed() -> void:
get_tree().quit(0)