A DijkstraField object holds both direction and distance data between a target tile and all the tiles that are accessible to this target into a specified maximum distance range.
More...
|
| bool | IsTileAccessible< T > (T[,] grid, T tile) |
| | Is the tile is accessible from the target.
|
| |
| T | GetTargetTile< T > (T[,] grid) |
| | Returns the target tile.
|
| |
| T | GetNextTile< T > (T[,] grid, T tile) |
| | Get the next tile on the path between a tile and the target.
|
| |
| TileDirection | GetNextDirection< T > (T[,] grid, T tile) |
| | Get the next tile on the path between the target and a tile.
|
| |
| T[] | GetPathToTarget< T > (T[,] grid, T startTile, bool includeStart=true, bool includeTarget=true) |
| | Get all the tiles on the path from a tile to the target.
|
| |
| T[] | GetPathFromTarget< T > (T[,] grid, T destinationTile, bool includeDestination=true, bool includeTarget=true) |
| | Get all the tiles on the path from the target to a tile.
|
| |
| T | GetAccessibleTile< T > (T[,] grid, int index) |
| | Use this method to iterate though the accessible tiles. AccessibleTilesCount.
|
| |
| T[] | GetAccessibleTiles< T > (T[,] grid) |
| | Returns the tiles that accessible to the target.
|
| |
| void | GetAccessibleTilesNoAlloc< T > (T[,] grid, T[] accessibleTiles) |
| | Returns the tiles that accessible to the target.
|
| |
| float | GetDistanceToTarget< T > (T[,] grid, T tile) |
| | Get the distance from the specified tile to the target.
|
| |
|
|
float | MaxDistance [get] |
| | The maximum distance used to generate this DirectionField.
|
| |
|
int | AccessibleTilesCount [get] |
| | Gets the total number of accessible tiles.
|
| |
A DijkstraField object holds both direction and distance data between a target tile and all the tiles that are accessible to this target into a specified maximum distance range.
◆ GetAccessibleTile< T >()
| T Caskev.GridToolkit.DijkstraField.GetAccessibleTile< T > |
( |
T |
grid[,], |
|
|
int |
index |
|
) |
| |
Use this method to iterate though the accessible tiles. AccessibleTilesCount.
- Template Parameters
-
| T | The type of the tile, which must implement the ITile interface. |
- Parameters
-
| grid | A two-dimensional array representing the grid of tiles. |
| index | The zero-based index of the accessible tile in the accessible tiles list AccessibleTilesCount. |
- Returns
- The tile of type T located at the specified index in the accessible tiles list.
◆ GetAccessibleTiles< T >()
| T[] Caskev.GridToolkit.DijkstraField.GetAccessibleTiles< T > |
( |
T |
grid[,] | ) |
|
Returns the tiles that accessible to the target.
- Parameters
-
| grid | A two-dimensional array representing the grid of tiles. |
- Returns
- The tiles that accessible to the target.
◆ GetAccessibleTilesNoAlloc< T >()
| void Caskev.GridToolkit.DijkstraField.GetAccessibleTilesNoAlloc< T > |
( |
T |
grid[,], |
|
|
T[] |
accessibleTiles |
|
) |
| |
Returns the tiles that accessible to the target.
- Parameters
-
| grid | A two-dimensional array representing the grid of tiles. |
| accessibleTiles | An array of tiles in which the tiles will be stored. |
◆ GetDistanceToTarget< T >()
| float Caskev.GridToolkit.DijkstraField.GetDistanceToTarget< T > |
( |
T |
grid[,], |
|
|
T |
tile |
|
) |
| |
Get the distance from the specified tile to the target.
- Parameters
-
| grid | A two-dimensional array of tiles |
| tile | The tile from which to get the distance to the target tile |
- Returns
- The float distance from the specified tile to the target tile
◆ GetNextDirection< T >()
| TileDirection Caskev.GridToolkit.DijkstraField.GetNextDirection< T > |
( |
T |
grid[,], |
|
|
T |
tile |
|
) |
| |
Get the next tile on the path between the target and a tile.
- Parameters
-
| grid | A two-dimensional array of tiles |
| tile | The tile |
- Returns
- A Vector2Int direction
◆ GetNextTile< T >()
| T Caskev.GridToolkit.DijkstraField.GetNextTile< T > |
( |
T |
grid[,], |
|
|
T |
tile |
|
) |
| |
Get the next tile on the path between a tile and the target.
- Parameters
-
| grid | A two-dimensional array of tiles |
| tile | A tile |
- Returns
- A tile object
◆ GetPathFromTarget< T >()
| T[] Caskev.GridToolkit.DijkstraField.GetPathFromTarget< T > |
( |
T |
grid[,], |
|
|
T |
destinationTile, |
|
|
bool |
includeDestination = true, |
|
|
bool |
includeTarget = true |
|
) |
| |
Get all the tiles on the path from the target to a tile.
- Parameters
-
| grid | A two-dimensional array of tiles |
| destinationTile | The destination tile |
| includeDestination | Include the destination tile into the resulting array or not. Default is true |
| includeTarget | Include the target tile into the resulting array or not |
- Returns
- An array of tiles
◆ GetPathToTarget< T >()
| T[] Caskev.GridToolkit.DijkstraField.GetPathToTarget< T > |
( |
T |
grid[,], |
|
|
T |
startTile, |
|
|
bool |
includeStart = true, |
|
|
bool |
includeTarget = true |
|
) |
| |
Get all the tiles on the path from a tile to the target.
- Parameters
-
| grid | A two-dimensional array of tiles |
| startTile | The start tile |
| includeStart | Include the start tile into the resulting array or not. Default is true |
| includeTarget | Include the target tile into the resulting array or not |
- Returns
- An array of tiles
◆ GetTargetTile< T >()
| T Caskev.GridToolkit.DijkstraField.GetTargetTile< T > |
( |
T |
grid[,] | ) |
|
Returns the target tile.
- Parameters
-
| grid | A two-dimensional array of tiles |
- Returns
◆ IsTileAccessible< T >()
| bool Caskev.GridToolkit.DijkstraField.IsTileAccessible< T > |
( |
T |
grid[,], |
|
|
T |
tile |
|
) |
| |
Is the tile is accessible from the target.
- Parameters
-
| grid | A two-dimensional array of tiles |
| tile | The tile to check |
- Returns
- A boolean value
The documentation for this class was generated from the following file: