A manager required in your scenes that use CharacterGridMovement.
More...
|
virtual bool | CellIsOccupied (Vector3 cellCoordinates) |
| Returns true if the cell at the specified coordinates is occupied, false otherwise More...
|
|
virtual void | OccupyCell (Vector3 cellCoordinates) |
| Marks the specified cell as occupied More...
|
|
virtual void | FreeCell (Vector3 cellCoordinates) |
| Marks the specified cell as unoccupied More...
|
|
virtual void | SetNextPosition (GameObject trackedObject, Vector3Int cellCoordinates) |
| Sets the next position of the specified object traveling on the grid. The next position is the position the object will be at when it reaches its destination grid cell More...
|
|
virtual void | SetLastPosition (GameObject trackedObject, Vector3Int cellCoordinates) |
| Sets the last position of the specified object traveling on the grid. The last position is the position the object was at the last time it passed on a perfect tile More...
|
|
virtual Vector3Int | WorldToCellCoordinates (Vector3 worldPosition) |
| Returns the corresponding world coordinates of a grid position More...
|
|
virtual Vector3 | CellToWorldCoordinates (Vector3Int coordinates) |
| Converts cell coordinates into their world position More...
|
|
virtual Vector3 | ComputeGridPosition (Vector3 targetPosition) |
| Returns the grid position of the specified vector in world position More...
|
|
virtual Vector3 | ComputeWorldPosition (Vector3 targetPosition) |
| Computes the grid position of a vector3 specified in grid units More...
|
|
A manager required in your scenes that use CharacterGridMovement.
◆ DebugDrawModes
the possible types of debug modes
◆ CellIsOccupied()
virtual bool MoreMountains.TopDownEngine.GridManager.CellIsOccupied |
( |
Vector3 |
cellCoordinates | ) |
|
|
virtual |
Returns true if the cell at the specified coordinates is occupied, false otherwise
- Parameters
-
- Returns
◆ CellToWorldCoordinates()
virtual Vector3 MoreMountains.TopDownEngine.GridManager.CellToWorldCoordinates |
( |
Vector3Int |
coordinates | ) |
|
|
virtual |
Converts cell coordinates into their world position
- Parameters
-
- Returns
◆ ComputeGridPosition()
virtual Vector3 MoreMountains.TopDownEngine.GridManager.ComputeGridPosition |
( |
Vector3 |
targetPosition | ) |
|
|
virtual |
Returns the grid position of the specified vector in world position
- Parameters
-
- Returns
◆ ComputeWorldPosition()
virtual Vector3 MoreMountains.TopDownEngine.GridManager.ComputeWorldPosition |
( |
Vector3 |
targetPosition | ) |
|
|
virtual |
Computes the grid position of a vector3 specified in grid units
- Parameters
-
- Returns
◆ DrawCell2D()
virtual void MoreMountains.TopDownEngine.GridManager.DrawCell2D |
( |
int |
a, |
|
|
int |
b |
|
) |
| |
|
protectedvirtual |
Draws a 2D debug cell
- Parameters
-
◆ DrawCell3D()
virtual void MoreMountains.TopDownEngine.GridManager.DrawCell3D |
( |
int |
a, |
|
|
int |
b |
|
) |
| |
|
protectedvirtual |
Draws a 3D debug cell
- Parameters
-
◆ FreeCell()
virtual void MoreMountains.TopDownEngine.GridManager.FreeCell |
( |
Vector3 |
cellCoordinates | ) |
|
|
virtual |
Marks the specified cell as unoccupied
- Parameters
-
◆ InitializeStatics()
static void MoreMountains.TopDownEngine.GridManager.InitializeStatics |
( |
| ) |
|
|
staticprotected |
Statics initialization to support enter play modes
◆ OccupyCell()
virtual void MoreMountains.TopDownEngine.GridManager.OccupyCell |
( |
Vector3 |
cellCoordinates | ) |
|
|
virtual |
Marks the specified cell as occupied
- Parameters
-
◆ OnDrawGizmos()
virtual void MoreMountains.TopDownEngine.GridManager.OnDrawGizmos |
( |
| ) |
|
|
protectedvirtual |
On draw gizmos, draws a debug grid
◆ SetLastPosition()
virtual void MoreMountains.TopDownEngine.GridManager.SetLastPosition |
( |
GameObject |
trackedObject, |
|
|
Vector3Int |
cellCoordinates |
|
) |
| |
|
virtual |
Sets the last position of the specified object traveling on the grid. The last position is the position the object was at the last time it passed on a perfect tile
◆ SetNextPosition()
virtual void MoreMountains.TopDownEngine.GridManager.SetNextPosition |
( |
GameObject |
trackedObject, |
|
|
Vector3Int |
cellCoordinates |
|
) |
| |
|
virtual |
Sets the next position of the specified object traveling on the grid. The next position is the position the object will be at when it reaches its destination grid cell
- Parameters
-
trackedObject | |
cellCoordinates | |
◆ Start()
virtual void MoreMountains.TopDownEngine.GridManager.Start |
( |
| ) |
|
|
protectedvirtual |
On start we initialize our lists and dictionaries
◆ WorldToCellCoordinates()
virtual Vector3Int MoreMountains.TopDownEngine.GridManager.WorldToCellCoordinates |
( |
Vector3 |
worldPosition | ) |
|
|
virtual |
Returns the corresponding world coordinates of a grid position
- Parameters
-
- Returns
◆ _debugDestination
Vector3 MoreMountains.TopDownEngine.GridManager._debugDestination = Vector3.zero |
|
protected |
◆ _debugOrigin
Vector3 MoreMountains.TopDownEngine.GridManager._debugOrigin = Vector3.zero |
|
protected |
◆ _newGridPosition
Vector3 MoreMountains.TopDownEngine.GridManager._newGridPosition |
|
protected |
◆ _workCoordinate
Vector3Int MoreMountains.TopDownEngine.GridManager._workCoordinate = Vector3Int.zero |
|
protected |
◆ CellBorderColor
Color MoreMountains.TopDownEngine.GridManager.CellBorderColor = new Color(60f, 221f, 255f, 1f) |
the color to use to draw the debug grid lines
◆ DebugDrawMode
the mode in which to draw the debug grid
◆ DebugGridSize
int MoreMountains.TopDownEngine.GridManager.DebugGridSize = 30 |
the size (in squares of the debug grid)
◆ DrawDebugGrid
bool MoreMountains.TopDownEngine.GridManager.DrawDebugGrid = true |
whether or not to draw the debug grid
◆ GridOrigin
Transform MoreMountains.TopDownEngine.GridManager.GridOrigin |
the origin of the grid in world space
◆ GridUnitSize
float MoreMountains.TopDownEngine.GridManager.GridUnitSize = 1f |
the size of each square grid cell
◆ InnerColor
Color MoreMountains.TopDownEngine.GridManager.InnerColor = new Color(60f, 221f, 255f, 0.3f) |
the color to use to draw the debug grid cells backgrounds
◆ LastPositions
Dictionary<GameObject, Vector3Int> MoreMountains.TopDownEngine.GridManager.LastPositions |
a dictionary holding all last positions registered by objects traveling on the grid
◆ NextPositions
Dictionary<GameObject, Vector3Int> MoreMountains.TopDownEngine.GridManager.NextPositions |
a dictionary holding all next positions registered by objects traveling on the grid
◆ OccupiedGridCells
List<Vector3> MoreMountains.TopDownEngine.GridManager.OccupiedGridCells |
a list of all cells currently occupied
The documentation for this class was generated from the following file:
- F:/Github/Store/TopDownEngine/Assets/TopDownEngine/Common/Scripts/Managers/GridManager.cs