public void SetNodeGraph(ref NodeGraph nodeGraph, EntityManager entityManager) { GoalNodeView = NodeView.ConstructNodeTree(ref nodeGraph, entityManager); }
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); } }