Class Tile
Represents one tile of a grid
Assembly: cs.temp.dll.dll
Syntax
Fields
AgentRenderer
Declaration
public SetupTileRenderer AgentRenderer
Field Value
Block
Whether or not this tile is blocked by solid Collider
Declaration
Field Value
Colliders
All colliders over this tile
Declaration
public Collider[] Colliders
Field Value
Type |
Description |
Collider[] |
|
CollidersNum
Declaration
Field Value
Coord
The integer coordinates in the grid
Declaration
Field Value
Height
Total space above the tile available to pass
Declaration
Field Value
Link
The NavLink which Tile belongs to and activate
Declaration
Field Value
Normal
The normal of this tile (for curved terrains)
Declaration
Field Value
OnlyFlying
The normal of this tile (for curved terrains)
Declaration
Field Value
Position
The absolute world position of the center of this tile
Declaration
Field Value
Renderer
Declaration
public SetupTileRenderer Renderer
Field Value
Rotation
The normal of this tile (for curved terrains)
Declaration
public Quaternion Rotation
Field Value
Type |
Description |
Quaternion |
|
The normal of this tile (for curved terrains)
Declaration
public Matrix4x4 TransformMatrix
Field Value
Type |
Description |
Matrix4x4 |
|
The normal of this tile (for curved terrains)
Declaration
public Plane TransformPlane
Field Value
Zones
All NavZones this Tile belongs to
Declaration
Field Value
Properties
Matrix
Declaration
public NavmeshMatrix Matrix { get; }
Property Value
Occupied
The 'not walkable through' NavAgent occupying this Tile
Declaration
public NavObject Occupied { get; set; }
Property Value
Methods
DistanceTo(GridCoord)
Calculate distance between this tile and a specific coordinate tile
Declaration
public float DistanceTo(GridCoord coord)
Parameters
Type |
Name |
Description |
GridCoord |
coord |
Coordinate
|
Returns
Type |
Description |
float |
The distance in float
|
GetFree(float, float)
The normal of this tile (for curved terrains)
Declaration
public bool GetFree(float col, float row)
Parameters
Type |
Name |
Description |
float |
col |
|
float |
row |
|
Returns
GetPositionAt(Vector3, NavObject)
The normal of this tile (for curved terrains)
Declaration
public Vector3 GetPositionAt(Vector3 position, NavObject floor = null)
Parameters
Type |
Name |
Description |
Vector3 |
position |
|
NavObject |
floor |
|
Returns
GetTileAtOffset(int, int, int)
Declaration
public Tile GetTileAtOffset(int col, int row, int lvl)
Parameters
Type |
Name |
Description |
int |
col |
|
int |
row |
|
int |
lvl |
|
Returns
GetTilesAround(GridCoord, bool, float, float, float)
Get all tiles around using specific parameters
Declaration
public Tile[] GetTilesAround(GridCoord coord, bool diagonals = true, float maxHeight = 1, float maxFall = 1, float groundDistance = 0)
Parameters
Type |
Name |
Description |
GridCoord |
coord |
Central tile coordinate
|
bool |
diagonals |
Whether or not to include diagonals
|
float |
maxHeight |
Max distance going up to consider available tile
|
float |
maxFall |
Max distance going down to consider available tile
|
float |
groundDistance |
|
Returns
GetTilesAround(NavObject)
Get all tiles around specific NavAgent, including diagonals
Declaration
public Tile[] GetTilesAround(NavObject obj)
Parameters
Returns
Type |
Description |
Tile[] |
A Tile array
|
GetTilesAround(int, int, int, bool, float, float, float)
The normal of this tile (for curved terrains)
Declaration
public Tile[] GetTilesAround(int lvl, int col, int row, bool diagonals = true, float maxHeight = 1, float maxFall = 1, float groundDistance = 0)
Parameters
Type |
Name |
Description |
int |
lvl |
|
int |
col |
|
int |
row |
|
bool |
diagonals |
|
float |
maxHeight |
|
float |
maxFall |
|
float |
groundDistance |
|
Returns
The normal of this tile (for curved terrains)
Declaration
public void ResetTransformMatrix()