Example #1
0
        public void GenerateRec(AbsUnderNode node, World world)
        {
            node.Build(world);

            foreach (var n in node.children)
            {
                GenerateRec(n, world);
            }
        }
Example #2
0
        // TODO: Build and cache this, DO NOT build this everytime OMG ...
        AbsUnderNode buildNodeRec(AbsNode node)
        {
            AbsUnderNode result = node._Build();

            LinkedList <AbsUnderNode> children = new LinkedList <AbsUnderNode>();

            foreach (var o in node.Outputs)
            {
                foreach (var c in o.GetConnections())
                {
                    if (c.node is AbsNode)
                    {
                        children.AddLast(buildNodeRec(c.node as AbsNode));
                    }
                }
            }

            result.children = children;
            return(result);
        }
Example #3
0
 public AbsUnderNode _Build()
 {
     AbsUnderNode n = Build(); n.Init(); built = true; return(n);
 }