예제 #1
0
 //获取range范围内的可以通过的格子
 public Vector2Int?FindRangeFreePoint(int x1, int y1, int x2, int y2,
                                      List <Vector2Int> exceptPointList,
                                      int[] canPassObstacleTypes, int[] canPassTerrainTypes, RandomManager randomManager = null)
 {
     return(AStarUtil.FindRangeFreePoint(this, x1, y1, x2, y2, exceptPointList, canPassObstacleTypes,
                                         canPassTerrainTypes, randomManager));
 }
예제 #2
0
        public static Action Test_FindRangeFreePoint()
        {
            Vector2Int?point = AStarUtil.FindRangeFreePoint(new AStarMapPath(grids), 0, 0, 4, 4, null,
                                                            AStarMapPathConst.Critter_Can_Pass_Obstacle_Types, AStarMapPathConst.User_Can_Pass_Terrain_Types);

            return(() =>
            {
                if (point != null)
                {
                    AStarUtil.GUIShowPointList(0, 0, 9, 9, new List <Vector2Int> {
                        point.Value
                    });
                }
            });
        }