Class SimpleGrid
public static class SimpleGrid
- Inheritance
-
SimpleGrid
- Inherited Members
Methods
Hex<T>(int)
public static IGrid<GridPoint2, T> Hex<T>(int radius)
Parameters
radiusint
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
radiusintinitialElementT
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
rootGameObjectGameObject where all the cells are going to be stored.
widthintWidth of the grid.
heightintHeight of the grid.
prefabTPrefab to use for the cells on the grid.
cellDimensionsVector2The 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
meshMeshMesh to use to place the generated mesh grid.
widthintWidth of the grid.
heightintHeight of the grid.
meshDataMeshDataThe mesh data information to use for the cells.
cellDimensionsVector2The 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