public static FloodPath Construct(Vector3 start, OnPathDelegate callback = null) { var p = PathPool.GetPath <FloodPath>(); p.Setup(start, callback); return(p); }
/** Construct a path with a start and end point. * The delegate will be called when the path has been calculated. * Do not confuse it with the Seeker callback as they are sent at different times. * If you are using a Seeker to start the path you can set \a callback to null. * * \returns The constructed path object */ public static ABPath Construct(Vector3 start, Vector3 end, OnPathDelegate callback = null) { var p = PathPool.GetPath <ABPath>(); p.Setup(start, end, callback); return(p); }
public static RandomPath Construct(Vector3 start, int length, OnPathDelegate callback = null) { var p = PathPool.GetPath <RandomPath>(); p.Setup(start, length, callback); return(p); }
public static MultiTargetPath Construct(Vector3 start, Vector3[] targets, OnPathDelegate[] callbackDelegates, OnPathDelegate callback = null) { var p = PathPool.GetPath <MultiTargetPath>(); p.Setup(start, targets, callbackDelegates, callback); return(p); }
/** Constructs a ConstantPath starting from the specified point. * \param start From where the path will be started from (the closest node to that point will be used) * \param maxGScore Searching will be stopped when a node has a G score greater than this * \param callback Will be called when the path has completed, leave this to null if you use a Seeker to handle calls * * Searching will be stopped when a node has a G score (cost to reach it) greater or equal to \a maxGScore * in order words it will search all nodes with a cost to get there less than \a maxGScore. */ public static ConstantPath Construct(Vector3 start, int maxGScore, OnPathDelegate callback = null) { var p = PathPool.GetPath <ConstantPath>(); p.Setup(start, maxGScore, callback); return(p); }
/** Constructs a new FleePath. * The FleePath will be taken from a pool. */ public static FleePath Construct(Vector3 start, Vector3 avoid, int searchLength, OnPathDelegate callback = null) { var p = PathPool.GetPath <FleePath>(); p.Setup(start, avoid, searchLength, callback); return(p); }
public new static XPath Construct(Vector3 start, Vector3 end, OnPathDelegate callback = null) { var p = PathPool.GetPath <XPath>(); p.Setup(start, end, callback); p.endingCondition = new ABPathEndingCondition(p); return(p); }
public static FloodPath Construct(GraphNode start, OnPathDelegate callback = null) { if (start == null) { throw new ArgumentNullException("start"); } var p = PathPool.GetPath <FloodPath>(); p.Setup(start, callback); return(p); }