示例#1
0
        public void Multiple_paths()
        {
            var(level, target) = PathFinderTest.TestPath(@"
*##..............#...#.#.*.#..#.#.#.#.#.#...
.*############.#.#.#.#.#*#*#.#.#.#.#.#.#....
##*..........#.#.#.#.#.#*#*##.############..
.*############.#.#.#.#.#*#*#.##.#...#...#...
*##............#.#.#.#.*.#.*....#.#.#.#.#*..
*...############.#.#.#*#.#.#*##...#.#.#.#*..
*####..............#.#*#.#.##*##..#...#.#*..
*.....##############.#*#.#.#.#*########.*...
*######..............#*#...#..#*#*#*#*#*....
.*********************.#...#...#*#*#*#*#####",
                                                         Direction.North);

            var travelSystem = level.Entity.Manager.TravelSystem;

            for (var i = 0; i < Iterations; i++)
            {
                travelSystem.GetShortestPath(level, new Point(0, 0), target, Direction.North);
            }
        }
示例#2
0
 private void OnEnable()
 {
     finderTest = (PathFinderTest)target;
 }