 | AbstractUniformGridTCell, TPoint Constructor |
Constructs a new hex grid with a shape determined by the IsInsider shape.
Namespace:
Gamelogic.Grids
Assembly:
Assembly-CSharp (in Assembly-CSharp.dll) Version: 0.0.0.0
Syntaxprotected AbstractUniformGrid(
int width,
int height,
Func<TPoint, bool> isInsideTest,
Func<TPoint, TPoint> gridPointTransform,
Func<TPoint, TPoint> inverseGridPointTransform,
IEnumerable<TPoint> neighborDirections
)
Parameters
- width
- Type: SystemInt32
The with of the hex rectangle that will contain the grid. - height
- Type: SystemInt32
The height of the hex rectangle that will contain the grid. - isInsideTest
- Type: SystemFuncTPoint, Boolean
A function that tests whether a given point is inside
the grid.This function should not rely on the points given to it to be limited
in any way by the specified with and height. - gridPointTransform
- Type: SystemFuncTPoint, TPoint
Points returned by tis grid are transformed first with this delagate. - inverseGridPointTransform
- Type: SystemFuncTPoint, TPoint
This must be the inverse of the gridPointTransform function.
Together, these functions make it possible to do things such as flip axes. - neighborDirections
- Type: System.Collections.GenericIEnumerableTPoint
Possible direction of the neighbor
See Also