private Node CreateTreeNode(NodeConfig proto)
        {
            Node node = this.CreateOneNode(proto);

            if (proto.Children == null)
            {
                return(node);
            }

            foreach (NodeConfig nodeProto in proto.Children)
            {
                Node childNode = this.CreateTreeNode(nodeProto);
                node.AddChild(childNode);
            }
            return(node);
        }
        private Node CreateTreeNode(NodeProto proto)
        {
            Node node = this.CreateOneNode(proto);

            node.EndInit(this.GetOwner <Scene>());

            if (proto.Children == null)
            {
                return(node);
            }

            foreach (NodeProto nodeProto in proto.Children)
            {
                Node childNode = this.CreateTreeNode(nodeProto);
                node.AddChild(childNode);
            }
            return(node);
        }
Beispiel #3
0
 public void AddChild(Node child, Node parent)
 {
     parent.AddChild(child);
     child.Id = ++_id;
 }