void PrintChildren(int depth, DynamicTree<Actor> tree, DynamicTreeNode<Actor> node) { System.Console.WriteLine($"{new string('\t', depth)} -> [ {node.Child1Id} . {node.Child2Id} ] {new string('\t', 8 - depth)} {node.Bounds}"); var newDepth = depth + 1; if (node.Child1Id != -1) PrintChildren(newDepth, tree, tree.GetNodeAt(node.Child1Id)); if (node.Child2Id != -1) PrintChildren(newDepth, tree, tree.GetNodeAt(node.Child2Id)); }