Skip to content

Instantly share code, notes, and snippets.

@fire
Last active September 29, 2021 18:03
Show Gist options
  • Save fire/8cf929535e9c2af2e27f79a28bd28a97 to your computer and use it in GitHub Desktop.
Save fire/8cf929535e9c2af2e27f79a28bd28a97 to your computer and use it in GitHub Desktop.
var queue : Array
queue.push_back(scene)
while not queue.is_empty():
var front = queue.front()
var node = front
if node is AnimationPlayer:
_do(node)
var child_count : int = node.get_child_count()
for i in child_count:
queue.push_back(node.get_child(i))
queue.pop_front()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment