Struct HexGrid
Assembly: AnyPath.dll
Syntax
public struct HexGrid : IGraph<HexGridCell>, IDisposable
Constructors
HexGrid(int2, int2, IReadOnlyList<HexGridCell>, Allocator, HexGridType)
Declaration
public HexGrid(int2 min, int2 max, IReadOnlyList<HexGridCell> cells, Allocator allocator, HexGridType type = HexGridType.OddR)
Parameters
HexGrid(int2, int2, Allocator, HexGridType)
Declaration
public HexGrid(int2 min, int2 max, Allocator allocator, HexGridType type = HexGridType.OddR)
Parameters
Type |
Name |
Description |
int2 |
min |
|
int2 |
max |
|
Allocator |
allocator |
|
HexGridType |
type |
|
Fields
gridType
Declaration
public readonly HexGridType gridType
Field Value
max
Declaration
Field Value
min
Declaration
Field Value
Methods
Collect(HexGridCell, ref NativeList<Edge<HexGridCell>>)
Declaration
public void Collect(HexGridCell node, ref NativeList<Edge<HexGridCell>> edgeBuffer)
Parameters
GetCell(int2)
Declaration
public HexGridCell GetCell(int2 position)
Parameters
Type |
Name |
Description |
int2 |
position |
|
Returns
GetEnumerator()
Declaration
public HexGrid.Enumerator GetEnumerator()
Returns
GetSetCells(Allocator)
Declaration
public NativeArray<HexGridCell> GetSetCells(Allocator allocator)
Parameters
Type |
Name |
Description |
Allocator |
allocator |
|
Returns
InBounds(int2)
Declaration
public bool InBounds(int2 position)
Parameters
Type |
Name |
Description |
int2 |
position |
|
Returns
IsOpen(int2)
Declaration
public bool IsOpen(int2 position)
Parameters
Type |
Name |
Description |
int2 |
position |
|
Returns
SetCell(int2, float, int)
Declaration
public void SetCell(int2 position, float enterCost, int flags = 0)
Parameters
Type |
Name |
Description |
int2 |
position |
|
float |
enterCost |
|
int |
flags |
|
Implements
Extension Methods