Exemplo n.º 1
0
        public void AddLink(ConstellationNodeLink link)
        {
            while (abilityNodeLinkListList.Count <= link.Depth)
            {
                abilityNodeLinkListList.Add(new List <ConstellationNodeLink>());
            }
            while (abilityNodeLinkList.Count <= link.Start.Index || abilityNodeLinkList.Count <= link.End.Index)
            {
                abilityNodeLinkList.Add(null);
            }

            abilityNodeLinkListList[link.Depth].Add(link);
            abilityNodeLinkList[link.Start != this ? link.Start.Index : link.End.Index] = link;
        }
Exemplo n.º 2
0
        public ConstellationNodeLink(ConstellationNodeLink link, ConstellationNode extensionNode, bool appendBack)
        {
            nodeList = new List <ConstellationNode>();
            if (appendBack)
            {
                nodeList.AddRange(link.nodeList);
                nodeList.Add(extensionNode);
            }
            else
            {
                nodeList.Add(extensionNode);
                nodeList.AddRange(link.nodeList);
            }

            this.Start.AddLink(this);
            this.End.AddLink(this);
        }