using RichCreator.Utility.Structs; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace RichCreator.Utility.PathFinding { internal class Node { public ZTPoint Name { get; set; } public Node Parent { get; set; } /// /// 该节点到起点的最短距离 /// public double Weight { get; set; } public double GetAllWeight() { var allWeight = 0d; var node = this; do { allWeight += node.Weight; node = node.Parent; } while (node != null); return allWeight; } } }