Add Shop toggles poke
This commit is contained in:
@@ -8,3 +8,12 @@ static func find_food_item(node: Node) -> FoodItem:
|
||||
if child is FoodItem:
|
||||
return child
|
||||
return null
|
||||
|
||||
static func find_first_child_of_type(node: Node, type: Variant) -> Node:
|
||||
for child in node.get_children():
|
||||
if is_instance_of(child, type):
|
||||
return child
|
||||
var nested := find_first_child_of_type(child, type)
|
||||
if nested:
|
||||
return nested
|
||||
return null
|
||||
Reference in New Issue
Block a user