예제 #1
0
 /// <summary>
 /// Create a Dijkstra pathfinder
 /// </summary>
 public Dijkstra(TPassible Passible, int width, int height, int startx, int starty, int endx, int endy)
 {
     StartX        = startx;
     StartY        = starty;
     EndX          = endx;
     EndY          = endy;
     Nodes         = new NodeMap(width, height);
     this.Passible = Passible;
 }
예제 #2
0
 public Dijkstra(bool[,] BlockMap, int startx, int starty, int endx, int endy)
 {
     StartX        = startx;
     StartY        = starty;
     EndX          = endx;
     EndY          = endy;
     Nodes         = new NodeMap(BlockMap.GetLength(0), BlockMap.GetLength(1));
     this.BlockMap = BlockMap;
     Passible      = DefaultPassible;
 }