Exemplo n.º 1
0
        public void Load(ConfigNode node, List <RDNode> nodes)
        {
            string text   = string.Empty;
            RDNode rDNode = null;

            RDNode.Anchor anchor  = RDNode.Anchor.RIGHT;
            RDNode.Anchor anchor2 = RDNode.Anchor.LEFT;
            if (node.HasValue("parentID"))
            {
                text = node.GetValue("parentID");
            }
            if (text != string.Empty)
            {
                rDNode = this.FindNodeByID(text, nodes);
            }
            if (rDNode != null)
            {
                if (node.HasValue("lineFrom"))
                {
                    anchor = (RDNode.Anchor)((int)Enum.Parse(typeof(RDNode.Anchor), node.GetValue("lineFrom")));
                }
                if (node.HasValue("lineTo"))
                {
                    anchor2 = (RDNode.Anchor)((int)Enum.Parse(typeof(RDNode.Anchor), node.GetValue("lineTo")));
                }
                this.parent = new RDParentAnchor(rDNode, anchor);
                this.anchor = anchor2;
            }
            else
            {
                Debug.LogError("No RDNode registered with id " + text + "!");
            }
        }
Exemplo n.º 2
0
 public RDParent(RDParentAnchor parent, RDNode.Anchor anchor)
 {
     this.parent = parent;
     this.anchor = anchor;
 }