상속: AStarEnvTargetBase
예제 #1
0
        /// <summary>
        /// Flood-find the nearest location for which func returns true
        /// </summary>
        public static AStarResult FindNearest(IEnvironmentObject env, IntVector3 src, Func <IntVector3, bool> func, int maxNodeCount = 200000)
        {
            var initLocs = env.GetPositioningLocations(src, DirectionSet.Exact);
            var target   = new AStarDelegateTarget(env, func);

            return(Find(initLocs, target, maxNodeCount));
        }
예제 #2
0
        public static IEnumerable <AStarResult> FindMany(IEnvironmentObject env,
                                                         IntVector3 src, DirectionSet srcPositioning, Func <IntVector3, bool> func,
                                                         int maxNodeCount = 200000, CancellationToken?cancellationToken = null)
        {
            var target = new AStarDelegateTarget(env, func);

            return(FindMany(env, src, srcPositioning, target, maxNodeCount, cancellationToken));
        }
예제 #3
0
 /// <summary>
 /// Flood-find the nearest location for which func returns true
 /// </summary>
 public static AStarResult FindNearest(IEnvironmentObject env, IntVector3 src, Func<IntVector3, bool> func, int maxNodeCount = 200000)
 {
     var initLocs = env.GetPositioningLocations(src, DirectionSet.Exact);
     var target = new AStarDelegateTarget(env, func);
     return Find(initLocs, target, maxNodeCount);
 }
예제 #4
0
        public static IEnumerable<AStarResult> FindMany(IEnvironmentObject env,
			IntVector3 src, DirectionSet srcPositioning, Func<IntVector3, bool> func,
			int maxNodeCount = 200000, CancellationToken? cancellationToken = null)
        {
            var target = new AStarDelegateTarget(env, func);
            return FindMany(env, src, srcPositioning, target, maxNodeCount, cancellationToken);
        }