private void AddChildrenRecursive(Foo foo, int numChildren, bool force)
{
if (((this.IDCounter <= this.m_MaxItems) && (foo.depth < 12)) && (force || (UnityEngine.Random.value >= 0.5f)))
{
if (foo.children == null)
{
foo.children = new List<Foo>(numChildren);
}
for (int i = 0; i < numChildren; i++)
{
int num2;
this.IDCounter = num2 = this.IDCounter + 1;
Foo item = new Foo("Tud" + this.IDCounter, foo.depth + 1, num2) {
parent = foo
};
foo.children.Add(item);
}
if (this.IDCounter <= this.m_MaxItems)
{
foreach (Foo foo3 in foo.children)
{
this.AddChildrenRecursive(foo3, UnityEngine.Random.Range(3, 15), false);
}
}
}
}