summaryrefslogtreecommitdiffstats
path: root/level_main_menu.gd
diff options
context:
space:
mode:
authorJan Tuomi <jan@jantuomi.fi>2025-11-14 11:57:22 +0200
committerJan Tuomi <jan@jantuomi.fi>2025-11-14 11:57:36 +0200
commit3c306f183a2290b076ff0be01d4b1dc1428bffea (patch)
tree246c4f08035d4ea1019a92499b88ed0b61f81827 /level_main_menu.gd
parentc6080b5666d4f961a11b2b420fecb581da69528e (diff)
Add initial level system, main menu
Diffstat (limited to 'level_main_menu.gd')
-rw-r--r--level_main_menu.gd15
1 files changed, 15 insertions, 0 deletions
diff --git a/level_main_menu.gd b/level_main_menu.gd
new file mode 100644
index 0000000..2ee46bd
--- /dev/null
+++ b/level_main_menu.gd
@@ -0,0 +1,15 @@
+class_name LevelMainMenu
+extends Node2D
+
+@onready var root: Root = get_tree().root.get_child(0)
+
+# Called when the node enters the scene tree for the first time.
+func _ready() -> void:
+ $TestLevelButton.pressed.connect(_test_level_button_pressed)
+
+# Called every frame. 'delta' is the elapsed time since the previous frame.
+func _process(_delta: float) -> void:
+ pass
+
+func _test_level_button_pressed():
+ root.change_level("test")