//--------------------------------------------------------------------------------------------- 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; } } }
//--------------------------------------------------------------------------------------------- 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); } } }
//--------------------------------------------------------------------------------------------- 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); } } }