Interface IPathFinder
Interface for a path finder.
Namespace: Fibula.Mechanics.Contracts.Abstractions
Assembly: Fibula.Mechanics.Contracts.dll
Syntax
public interface IPathFinder
Methods
| Improve this Doc View SourceFindBetween(Location, Location, ICreature, Int32, Boolean, Int32, Location[])
Declaration
(SearchState result, Location endLocation, IEnumerable<Direction> directions) FindBetween(Location startLocation, Location targetLocation, ICreature onBehalfOfCreature = null, int maxStepsCount = 0, bool considerAvoidsAsBlocking = true, int targetDistance = 1, params Location[] excludeLocations)
Parameters
Type | Name | Description |
---|---|---|
Location | startLocation | The start location. |
Location | targetLocation | The target location to find a path to. |
ICreature | onBehalfOfCreature | Optional. The creature on behalf of which the search is being performed. |
System.Int32 | maxStepsCount | Optional. The maximum number of search steps to perform before giving up on finding the target location. A default value must be picked by the implementation or else it may cost too much to search. |
System.Boolean | considerAvoidsAsBlocking | Optional. A value indicating whether to consider the creature avoid tastes as blocking in path finding. Defaults to true. |
System.Int32 | targetDistance | Optional. The target distance from the target node to shoot for. |
Location[] | excludeLocations | Optional. Locations to explicitly exclude as a valid goal in the search. |
Returns
Type | Description |
---|---|
System.ValueTuple<SearchState, Location, System.Collections.Generic.IEnumerable<Direction>> | A tuple consisting of the result of the path search, the end location before returning (even when giving up), and an System.Collections.Generic.IEnumerable<T> of Directions leading to that end location. |