Method InitTileGrid
InitTileGrid<TPoint, TCell>(IGrid<TPoint, TCell>, GridMap<TPoint>, TCell, GameObject, Action<TPoint, TCell>)
A convenience method to initialize a grid of SpriteCells from code.
public static void InitTileGrid<TPoint, TCell>(IGrid<TPoint, TCell> grid, GridMap<TPoint> map, TCell cellPrefab, GameObject gridRoot, Action<TPoint, TCell> initCellAction) where TCell : ComponentParameters
- gridIGrid<TPoint, TCell>
- A grid in which newly instantiate cells will be placed. 
- mapGridMap<TPoint>
- A map that will convert between grid points and world points. 
- cellPrefabTCell
- The prefab that will be used to instantiate cells from. 
- gridRootGameObject
- The object to use as root for the instantiated cells. 
- initCellActionAction<TPoint, TCell>
- A function that can be used to initialize the cell at the given point. 
Type Parameters
- TPoint
- The point type of the grid to initialize. 
- TCell
- The cell type of the grid.