pirate-survivors/Maps/main_menu.gd
2026-01-18 14:40:24 +01:00

20 lines
512 B
GDScript

extends Control
@export var game_map : PackedScene
# Called when the node enters the scene tree for the first time.
func _ready() -> void:
$VBoxContainer/NewGameButton.pressed.connect(_on_new_game_pressed)
$VBoxContainer/QuitButton.pressed.connect(_on_quit_pressed)
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta: float) -> void:
pass
func _on_new_game_pressed():
get_tree().change_scene_to_packed(game_map)
func _on_quit_pressed():
get_tree().quit()