using System.Collections.Generic; namespace HxGame.PathFinding { public struct PathFinderNode { public float F; public float G; public float H; // f = gone + heuristic public int X; public int Y; public int PX; // Parent public int PY; } public enum PathFinderNodeType { Start = 1, End = 2, Open = 4, Close = 8, Current = 16, Path = 32 } //ÏûºÄËã·¨ public enum HeuristicFormula { Manhattan = 1, MaxDXDY = 2, DiagonalShortCut = 3, Euclidean = 4, EuclideanNoSQR = 5, Custom1 = 6 } internal class ComparePFNode : IComparer { public int Compare(PathFinderNode x, PathFinderNode y) { if (x.F > y.F) return 1; else if (x.F < y.F) return -1; return 0; } } }