rundumdiewelten/rund-um-die-welten/LevelSelectUtility/main_menu.gd

13 lines
286 B
GDScript3
Raw Normal View History

2025-09-19 16:37:23 +02:00
extends Node2D
func _ready() -> void:
GlobalVariables.play_music()
# Access the button using its name
var button = $Quit_Button
# Connect the "pressed" signal to a function in this script
button.pressed.connect(_on_button_pressed)
func _on_button_pressed():
get_tree().quit()