예제 #1
0
        private static void _TraverseCompositeTree(IComposite composite, int depth = 0, int index = 0)
        {
            _logger.Log($"{new String('\t', depth)}{index}|", isInline: true);
            composite.PrintSelf();

            for (int compositeChildIndex = 0; compositeChildIndex < composite.ChildrenCount; ++compositeChildIndex)
            {
                IComposite child = composite.GetChildAt(compositeChildIndex);
                _TraverseCompositeTree(child, depth: depth + 1, index: compositeChildIndex);
            }
        }