progress
This commit is contained in:
9
label.gd
9
label.gd
@@ -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"))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user