manages the different variants of mag grid pathing for DefaultStructureManager
there is only one variant if there are no special StructurePathOptions defined
|
|
void | Initialize (GridPathfindingSettings pathfindingSettings, StructurePathOption[] options) |
| |
|
void | Dispose () |
| |
|
void | Add (Vector2Int point) |
| |
|
void | CheckPoints (IStructureManager manager, IEnumerable< Vector2Int > points) |
| |
|
void | Calculate (int maxCalculations=PathQuery.DEFAULT_MAX_CALCULATIONS) |
| |
| bool | HasPoint (Vector2Int point, object tag=null) |
| | checks if a point exists within the pathfinder
for example points on map pathing that are blocked or points for road pathing that dont have a road
|
| |
| WalkingPath | FindPath (Vector2Int[] starts, Vector2Int[] targets, object tag=null) |
| | attempts to find a path between one of the starts and one of the ends
|
| |
| PathQuery | FindPathQuery (Vector2Int[] starts, Vector2Int[] targets, object tag=null) |
| |
| void | RegisterLink (IGridLink link, object tag) |
| | adds a link to the linker
|
| |
| void | DeregisterLink (IGridLink link, object tag) |
| | removes a link from the linker
|
| |
| IEnumerable< IGridLink > | GetLinks (Vector2Int start, object tag) |
| | retrieves all links starting at a specific point
|
| |
| IGridLink | GetLink (Vector2Int start, Vector2Int end, object tag) |
| | retrieves a link connecting two specific points if one exists
|
| |
◆ DeregisterLink()
| void CityBuilderCore.StructurePaths.DeregisterLink |
( |
IGridLink | link, |
|
|
object | tag ) |
|
inline |
removes a link from the linker
- Parameters
-
| link | the link to be removed |
| tag | additional information, for example the Road when the link should be removed to a specific road network |
Implements CityBuilderCore.IGridLinker.
◆ FindPath()
| WalkingPath CityBuilderCore.StructurePaths.FindPath |
( |
Vector2Int[] | starts, |
|
|
Vector2Int[] | targets, |
|
|
object | tag = null ) |
attempts to find a path between one of the starts and one of the ends
- Parameters
-
| starts | collection of one or more possible start points |
| targets | collection of one or more possible start points |
| tag | additional pathfinding parameter(road type, walker info, ...) |
- Returns
- the calculated path or null when no path was found
Implements CityBuilderCore.IPathfinder.
◆ FindPathQuery()
| PathQuery CityBuilderCore.StructurePaths.FindPathQuery |
( |
Vector2Int[] | starts, |
|
|
Vector2Int[] | targets, |
|
|
object | tag = null ) |
◆ GetLink()
| IGridLink CityBuilderCore.StructurePaths.GetLink |
( |
Vector2Int | start, |
|
|
Vector2Int | end, |
|
|
object | tag ) |
retrieves a link connecting two specific points if one exists
- Parameters
-
| start | start point of the potential link |
| end | end point of the potential link |
| tag | additional parameter |
- Returns
Implements CityBuilderCore.IGridLinker.
◆ GetLinks()
| IEnumerable< IGridLink > CityBuilderCore.StructurePaths.GetLinks |
( |
Vector2Int | start, |
|
|
object | tag ) |
retrieves all links starting at a specific point
- Parameters
-
| start | the point at which to look for lniks |
| tag | additional parameter |
- Returns
Implements CityBuilderCore.IGridLinker.
◆ HasPoint()
| bool CityBuilderCore.StructurePaths.HasPoint |
( |
Vector2Int | point, |
|
|
object | tag = null ) |
checks if a point exists within the pathfinder
for example points on map pathing that are blocked or points for road pathing that dont have a road
- Parameters
-
| point | the map point to check |
| tag | additional pathfinding parameter(road type, walker info, ...) |
- Returns
- whether the point exists in the pathfinder
Implements CityBuilderCore.IPathfinder.
◆ RegisterLink()
| void CityBuilderCore.StructurePaths.RegisterLink |
( |
IGridLink | link, |
|
|
object | tag ) |
|
inline |
adds a link to the linker
- Parameters
-
| link | the link to be added |
| tag | additional information, for example the Road when the link should be added to a specific road network |
Implements CityBuilderCore.IGridLinker.