Beispiel #1
0
 public Vector2Int?GetRandomMovePoint(Vector2Int basePoint, Vector2Int goalPoint,
                                      int maxRadiusBetweenTargetPointAndGoalPoint, int[] canPassObstacleTypes,
                                      int[] canPassTerrainTypes, RandomManager randomManager = null)
 {
     return(AStarUtil.GetRandomMovePoint(this, basePoint, goalPoint,
                                         maxRadiusBetweenTargetPointAndGoalPoint,
                                         canPassObstacleTypes, canPassTerrainTypes, randomManager));
 }
Beispiel #2
0
        public static Action Test_GetRandomMovePoint()
        {
            Vector2Int?point = AStarUtil.GetRandomMovePoint(new AStarMapPath(grids), new Vector2Int(0, 0),
                                                            new Vector2Int(3, 3)
                                                            , 2, 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
                    });
                }
            });
        }