예제 #1
0
 //获得轨迹中可通过的最远点
 public Vector2Int GetMostPassPoint(List <Vector2Int> trackList,
                                    int[] canPassObstacleTypes,
                                    int[] canPassTerrainTypes, bool isCanOut = false)
 {
     return(AStarUtil.GetMostPassPoint(this, trackList,
                                       canPassObstacleTypes,
                                       canPassTerrainTypes, isCanOut));
 }
예제 #2
0
        public static Action Test_GetMostPassPoint()
        {
            Vector2Int point = AStarUtil.GetMostPassPoint(new AStarMapPath(grids), new List <Vector2Int>()
            {
                new Vector2Int(0, 0),
                new Vector2Int(1, 1),
                new Vector2Int(2, 2),
                new Vector2Int(3, 3),
                new Vector2Int(4, 4),
            }, AStarMapPathConst.Critter_Can_Pass_Obstacle_Types, AStarMapPathConst.User_Can_Pass_Terrain_Types);

            return(() => { AStarUtil.GUIShowPointList(0, 0, 9, 9, point); });
        }