public JumpPointParam(BaseGrid iGrid, GridPos iStartPos, GridPos iEndPos, bool iCrossCorner = true, HeuristicMode iMode = HeuristicMode.EUCLIDEAN)
{
switch (iMode)
{
case HeuristicMode.MANHATTAN:
heuristic = new HeuristicDelegate(Heuristic.Manhattan);
break;
case HeuristicMode.EUCLIDEAN:
heuristic = new HeuristicDelegate(Heuristic.Euclidean);
break;
case HeuristicMode.CHEBYSHEV:
heuristic = new HeuristicDelegate(Heuristic.Chebyshev);
break;
default:
heuristic = new HeuristicDelegate(Heuristic.Euclidean);
break;
}
crossCorner = iCrossCorner;
openList = new List<Node>();
searchGrid = iGrid;
startNode = searchGrid.GetNodeAt(iStartPos.x, iStartPos.y);
endNode = searchGrid.GetNodeAt(iEndPos.x, iEndPos.y);
}