dev: 代码强类型

This commit is contained in:
2026-04-25 12:12:28 +08:00
parent 0118bf613c
commit 2cad85257e
4 changed files with 28 additions and 27 deletions
+5 -5
View File
@@ -5,10 +5,10 @@ var current_scene = null
var Card = ResourceLoader.load("res://scenes/game/card.tscn")
func _ready():
var root = get_tree().root
current_scene = root.get_child(root.get_child_count() - 1)
var root: Window = get_tree().root
current_scene = root.get_child(root.get_child_count() - 1)
func goto_scene(path: String):
get_tree().change_scene_to_file("res://scenes/%s.tscn" % [path])
var root = get_tree().root
current_scene = root.get_child(root.get_child_count() - 1)
get_tree().change_scene_to_file("res://scenes/%s.tscn" % [path])
var root: Window = get_tree().root
current_scene = root.get_child(root.get_child_count() - 1)