/// <summary> /// trivial validity check to remove AStar process for totally blocked tiles /// </summary> bool GetTileReachableSimple(IntVector3 p, DesignationType type) { DirectionSet dirs = GetDesignationPositioning(p, type); dirs = dirs.Reverse(); return(dirs.ToSurroundingPoints(p).Any(this.Environment.CanEnter)); }
/// <summary> /// Return enterable positions around the given location, based on positioning /// </summary> public static IEnumerable<IntVector3> GetPositioningLocations(this IEnvironmentObject env, IntVector3 pos, DirectionSet positioning) { return positioning.ToSurroundingPoints(pos).Where(p => CanEnter(env, p)); }
/// <summary> /// Return enterable positions around the given location, based on positioning /// </summary> public static IEnumerable <IntVector3> GetPositioningLocations(this IEnvironmentObject env, IntVector3 pos, DirectionSet positioning) { return(positioning.ToSurroundingPoints(pos).Where(p => CanEnter(env, p))); }