Class SimpleGrid
public static class SimpleGrid
- Inheritance
-
SimpleGrid
- Inherited Members
Methods
Hex<T>(int)
public static IGrid<GridPoint2, T> Hex<T>(int radius)
Parameters
radius
int
Returns
- IGrid<GridPoint2, T>
Type Parameters
T
Hex<T>(int, Func<T>)
public static IGrid<GridPoint2, T> Hex<T>(int radius, Func<T> createCell)
Parameters
Returns
- IGrid<GridPoint2, T>
Type Parameters
T
Hex<T>(int, T)
public static IGrid<GridPoint2, T> Hex<T>(int radius, T initialElement)
Parameters
radius
intinitialElement
T
Returns
- IGrid<GridPoint2, T>
Type Parameters
T
RectXY<T>(GameObject, int, int, T, Vector2)
Creates a Pysical Grid.
public static PhysicalGrid<GridPoint2, T> RectXY<T>(GameObject root, int width, int height, T prefab, Vector2 cellDimensions) where T : Component
Parameters
root
GameObjectGameObject where all the cells are going to be stored.
width
intWidth of the grid.
height
intHeight of the grid.
prefab
TPrefab to use for the cells on the grid.
cellDimensions
Vector2The cell's dimensions.
Returns
Type Parameters
T
RectXY<T>(Mesh, int, int, MeshData, Vector2)
Creates a Mesh grid using the mesh data provided for each cell.
public static IGrid<GridPoint2, T> RectXY<T>(Mesh mesh, int width, int height, MeshData meshData, Vector2 cellDimensions)
Parameters
mesh
MeshMesh to use to place the generated mesh grid.
width
intWidth of the grid.
height
intHeight of the grid.
meshData
MeshDataThe mesh data information to use for the cells.
cellDimensions
Vector2The cell's dimensions.
Returns
- IGrid<GridPoint2, T>
Type Parameters
T
Rect<T>(int, int)
public static IGrid<GridPoint2, T> Rect<T>(int width, int height)
Parameters
Returns
- IGrid<GridPoint2, T>
Type Parameters
T
Rect<T>(int, int, Func<T>)
public static IGrid<GridPoint2, T> Rect<T>(int width, int height, Func<T> createCell)
Parameters
Returns
- IGrid<GridPoint2, T>
Type Parameters
T
Rect<T>(int, int, T)
public static IGrid<GridPoint2, T> Rect<T>(int width, int height, T initialElement)
Parameters
Returns
- IGrid<GridPoint2, T>
Type Parameters
T