Table of Contents

Class SimpleGrid

Namespace
Gamelogic.Grids2.Examples
Assembly
Assembly-CSharp.dll
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

radius int
createCell Func<T>

Returns

IGrid<GridPoint2, T>

Type Parameters

T

Hex<T>(int, T)

public static IGrid<GridPoint2, T> Hex<T>(int radius, T initialElement)

Parameters

radius int
initialElement 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 GameObject

GameObject where all the cells are going to be stored.

width int

Width of the grid.

height int

Height of the grid.

prefab T

Prefab to use for the cells on the grid.

cellDimensions Vector2

The cell's dimensions.

Returns

PhysicalGrid<GridPoint2, T>

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 Mesh

Mesh to use to place the generated mesh grid.

width int

Width of the grid.

height int

Height of the grid.

meshData MeshData

The mesh data information to use for the cells.

cellDimensions Vector2

The 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

width int
height int

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

width int
height int
createCell Func<T>

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

width int
height int
initialElement T

Returns

IGrid<GridPoint2, T>

Type Parameters

T