This commit is contained in:
2026-03-04 20:35:24 -08:00
parent 3fbb44f485
commit 33dc00cb6a
13 changed files with 257 additions and 47 deletions

View File

@@ -7,13 +7,14 @@ extends Node2D
@onready var label : Label = $"label"
func _ready():
for n in get_tree().get_nodes_in_group("set-piece"):
n.connect("entered", Callable(self, "_on_setpiece_entered"))
n.connect("exited", Callable(self, "_on_setpiece_exited"))
_connect_setpieces(get_parent())
func _on_transitioned(s):
$label.hide()
for n in get_tree().get_nodes_in_group("set-piece"):
_connect_setpieces(get_parent())
func _connect_setpieces(scene: Node) -> void:
for n in scene.find_children("*", "SetPiece"):
n.connect("entered", Callable(self, "_on_setpiece_entered"))
n.connect("exited", Callable(self, "_on_setpiece_exited"))