Exemple #1
0
        //---------------------------------------------------------------------------------------------

        public void NormalizeReferences(PathNodeList originalList)
        {
            for (int i = 0; i < this.Count; i++)
            {
                PathNode originalFound = originalList.FindNode(this[i].X, this[i].Y);
                if (originalFound != null)
                {
                    this[i] = originalFound;
                }
            }
        }
Exemple #2
0
        //---------------------------------------------------------------------------------------------

        public void MergeIdent(PathNodeList possibleList)
        {
            int count = this.Count;

            for (int i = count - 1; i >= 0; i--)
            {
                PathNode findNode = possibleList.FindNode(this[i].X, this[i].Y);
                if (findNode != null)
                {
                    this.RemoveAt(i);
                }
            }
        }
Exemple #3
0
        //---------------------------------------------------------------------------------------------

        public void MergePossible(PathNodeList possibleList)
        {
            int count = this.Count;

            for (int i = count - 1; i >= 0; i--)
            {
                PathNode findNode = possibleList.FindNode(this[i].X, this[i].Y);
                if (findNode == null || findNode.Walkable.HasValue && !findNode.Walkable.Value)
                {
                    this.RemoveAt(i);
                }
            }
        }