A DirectionGrid object holds direction data between a target tile and all the tiles that are accessible to this target, on the entire grid.
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.
|
| |
| byte[] | ToByteArray () |
| | Returns the DirectionGrid serialized as a byte array.
|
| |
| Task< byte[]> | ToByteArrayAsync (IProgress< float > progress=null, CancellationToken cancelToken=default) |
| | Returns the DirectionGrid serialized as a byte array.
|
| |
| async Awaitable< byte[]> | ToByteArrayAwaitable (IProgress< float > progress=null, CancellationToken cancelToken=default) |
| | Returns the DirectionGrid serialized as a byte array.
|
| |
|
| static DirectionGrid | FromByteArray< T > (T[,] grid, byte[] bytes) |
| | Returns a DirectionGrid from a byte array that has been serialized with the ToByteArray method.
|
| |
| static Task< DirectionGrid > | FromByteArrayAsync< T > (T[,] grid, byte[] bytes, IProgress< float > progress=null, CancellationToken cancelToken=default) |
| | Returns a DirectionGrid from a byte array that has been serialized with the ToByteArray method.
|
| |
| static async Awaitable< DirectionGrid > | FromByteArrayAwaitable< T > (T[,] grid, byte[] bytes, IProgress< float > progress=null, CancellationToken cancelToken=default) |
| | Returns a DirectionGrid from a byte array that has been serialized with the ToByteArray method.
|
| |
A DirectionGrid object holds direction data between a target tile and all the tiles that are accessible to this target, on the entire grid.
◆ FromByteArray< T >()
| static DirectionGrid Caskev.GridToolkit.DirectionGrid.FromByteArray< T > |
( |
T |
grid[,], |
|
|
byte[] |
bytes |
|
) |
| |
|
static |
Returns a DirectionGrid from a byte array that has been serialized with the ToByteArray method.
- Parameters
-
| grid | The user grid |
| bytes | The serialized byte array |
- Returns
- The deserialized DirectionGrid
◆ FromByteArrayAsync< T >()
| static Task< DirectionGrid > Caskev.GridToolkit.DirectionGrid.FromByteArrayAsync< T > |
( |
T |
grid[,], |
|
|
byte[] |
bytes, |
|
|
IProgress< float > |
progress = null, |
|
|
CancellationToken |
cancelToken = default |
|
) |
| |
|
static |
Returns a DirectionGrid from a byte array that has been serialized with the ToByteArray method.
- Parameters
-
| grid | The user grid |
| bytes | The serialized byte array |
| progress | An optional IProgress object to get the deserialization progression |
| cancelToken | An optional CancellationToken object to cancel the deserialization |
- Returns
- The deserialized DirectionGrid
◆ FromByteArrayAwaitable< T >()
| static async Awaitable< DirectionGrid > Caskev.GridToolkit.DirectionGrid.FromByteArrayAwaitable< T > |
( |
T |
grid[,], |
|
|
byte[] |
bytes, |
|
|
IProgress< float > |
progress = null, |
|
|
CancellationToken |
cancelToken = default |
|
) |
| |
|
static |
Returns a DirectionGrid from a byte array that has been serialized with the ToByteArray method.
- Parameters
-
| grid | The user grid |
| bytes | The serialized byte array |
| progress | An optional IProgress object to get the deserialization progression |
| cancelToken | An optional CancellationToken object to cancel the deserialization |
- Returns
- The deserialized DirectionGrid
◆ GetNextDirection< T >()
| TileDirection Caskev.GridToolkit.DirectionGrid.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.DirectionGrid.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.DirectionGrid.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.DirectionGrid.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.DirectionGrid.GetTargetTile< T > |
( |
T |
grid[,] | ) |
|
Returns the target tile.
- Parameters
-
| grid | A two-dimensional array of tiles |
- Returns
◆ IsTileAccessible< T >()
| bool Caskev.GridToolkit.DirectionGrid.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
◆ ToByteArray()
| byte[] Caskev.GridToolkit.DirectionGrid.ToByteArray |
( |
| ) |
|
Returns the DirectionGrid serialized as a byte array.
- Returns
- A byte array representing the serialized DirectionGrid
◆ ToByteArrayAsync()
| Task< byte[]> Caskev.GridToolkit.DirectionGrid.ToByteArrayAsync |
( |
IProgress< float > |
progress = null, |
|
|
CancellationToken |
cancelToken = default |
|
) |
| |
Returns the DirectionGrid serialized as a byte array.
- Parameters
-
| progress | An optional IProgress object to get the serialization progression |
| cancelToken | An optional CancellationToken object to cancel the serialization |
- Returns
- A byte array representing the serialized DirectionGrid
◆ ToByteArrayAwaitable()
| async Awaitable< byte[]> Caskev.GridToolkit.DirectionGrid.ToByteArrayAwaitable |
( |
IProgress< float > |
progress = null, |
|
|
CancellationToken |
cancelToken = default |
|
) |
| |
Returns the DirectionGrid serialized as a byte array.
- Parameters
-
| progress | An optional IProgress object to get the serialization progression |
| cancelToken | An optional CancellationToken object to cancel the serialization |
- Returns
- A byte array representing the serialized DirectionGrid
The documentation for this class was generated from the following file: