Beispiel #1
0
 public AStarPathfinder(ITileMap map, int maxSearchDistance, bool allowDiagMovement, IAStarHeuristic heuristic)
 {
     m_Closed = new List<AStarNode>();
       m_Open = new OrderedList<AStarNode>();
       m_Heuristic = heuristic;
       m_Map = map;
       m_MaxSearchDistance = maxSearchDistance;
       m_AllowDiagMovement = allowDiagMovement;
       m_Nodes = new AStarMatrix(map.Width);
 }
Beispiel #2
0
 public AStarPathfinder(ITileMap map, int maxSearchDistance, bool allowDiagMovement, IAStarHeuristic heuristic)
 {
     m_Closed            = new List <AStarNode>();
     m_Open              = new OrderedList <AStarNode>();
     m_Heuristic         = heuristic;
     m_Map               = map;
     m_MaxSearchDistance = maxSearchDistance;
     m_AllowDiagMovement = allowDiagMovement;
     m_Nodes             = new AStarMatrix(map.Width);
 }