17 lines
310 B
GDScript3
Raw Normal View History

2025-09-02 19:12:40 -06:00
extends Level
@onready var level: Node3D = %Level
func _clean_tree(node: Node) -> void:
if node is Gunkable:
(node as Gunkable).clear_all()
else:
for child: Node in node.get_children():
_clean_tree(child)
func clean_all() -> void:
print("Cleaning all props in the scene...")
_clean_tree(level)