Exemple #1
0
 /// <summary>
 /// Set the current pathfinding algorithm.
 /// </summary>
 /// <param name="algorithm">The algorithm to use in pathfinding.</param>
 public void SetPathfinder(PathfinderAlgorithm algorithm)
 {
     this.algorithm = algorithm;
     pathfinder     = PathfinderFactory.CreatePathfinder(algorithm, gridSize, this);
 }
Exemple #2
0
 /// <summary>
 /// Set the current pathfinding algorithm.
 /// </summary>
 /// <param name="algorithm">The algorithm to use in pathfinding.</param>
 public void SetPathfinder(PathfinderAlgorithm algorithm)
 {
     this.algorithm = algorithm;
     pathfinder     = PathfinderFactory.CreatePathfinder(algorithm, gridSize, this);
     Console.WriteLine("Map.cs: Pathfinding algorithm set to " + pathfinder.GetName() + ".\n");
 }