Beispiel #1
0
 public void SetNodeGraph(ref NodeGraph nodeGraph, EntityManager entityManager)
 {
     GoalNodeView = NodeView.ConstructNodeTree(ref nodeGraph, entityManager);
 }
Beispiel #2
0
        private static void ConstructNodeTree(ref NodeGraph nodeGraph, EntityManager entityManager, NodeView nodeView, Node node)
        {
            var children = nodeGraph.GetChildren(node);

            foreach (var child in children)
            {
                var newNodeView = new NodeView(ref nodeGraph, entityManager, child);
                nodeView.AddChild(newNodeView);
                ConstructNodeTree(ref nodeGraph, entityManager, newNodeView, child);
            }
        }