Struct SquareGrid
Assembly: AnyPath.dll
Syntax
public struct SquareGrid : IGraph<SquareGridCell>, IDisposable
Constructors
SquareGrid(int2, int2, SquareGridType, IReadOnlyList<SquareGridCell>, Allocator)
Declaration
public SquareGrid(int2 min, int2 max, SquareGridType neighbourMode, IReadOnlyList<SquareGridCell> cells, Allocator allocator)
Parameters
SquareGrid(int2, int2, SquareGridType, int, Allocator)
Declaration
public SquareGrid(int2 min, int2 max, SquareGridType neighbourMode, int capacity, Allocator allocator)
Parameters
Type |
Name |
Description |
int2 |
min |
|
int2 |
max |
|
SquareGridType |
neighbourMode |
|
int |
capacity |
|
Allocator |
allocator |
|
Fields
max
Declaration
Field Value
min
Declaration
Field Value
neighbourMode
Declaration
public readonly SquareGridType neighbourMode
Field Value
Methods
Collect(SquareGridCell, ref NativeList<Edge<SquareGridCell>>)
Declaration
public void Collect(SquareGridCell node, ref NativeList<Edge<SquareGridCell>> edgeBuffer)
Parameters
GetCell(int2)
Declaration
public SquareGridCell GetCell(int2 position)
Parameters
Type |
Name |
Description |
int2 |
position |
|
Returns
GetCost(int2)
Declaration
public float GetCost(int2 position)
Parameters
Type |
Name |
Description |
int2 |
position |
|
Returns
GetEnumerator()
Declaration
public SquareGrid.Enumerator GetEnumerator()
Returns
GetSetCells(Allocator)
Declaration
public NativeArray<SquareGridCell> 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