Class Cells2D<T>
Inheritance
object
Cells2D<T>
Assembly: Dew.Core.dll
Syntax
[Serializable]
public class Cells2D<T>
Type Parameters
Constructors
Cells2D()
Declaration
Cells2D(Vector2, float, int, int)
Declaration
public Cells2D(Vector2 worldCenter, float cellSize, int dataWidth, int dataHeight)
Parameters
| Type |
Name |
Description |
| UnityEngine.Vector2 |
worldCenter |
|
| float |
cellSize |
|
| int |
dataWidth |
|
| int |
dataHeight |
|
Fields
cellSize
Declaration
Field Value
center
Declaration
Field Value
| Type |
Description |
| UnityEngine.Vector2 |
|
data
Declaration
Field Value
dataHeight
Declaration
Field Value
dataWidth
Declaration
Field Value
max
Declaration
Field Value
| Type |
Description |
| UnityEngine.Vector2 |
|
min
Declaration
Field Value
| Type |
Description |
| UnityEngine.Vector2 |
|
size
Declaration
Field Value
| Type |
Description |
| UnityEngine.Vector2 |
|
Methods
FloodFill((int, int), Func<(int, int), bool>)
Declaration
public void FloodFill((int, int) start, Func<(int, int), bool> func)
Parameters
| Type |
Name |
Description |
| (int, int) |
start |
|
| System.Func<T, TResult><(int, int), bool> |
func |
|
Get((int, int))
Declaration
public T Get((int, int) indices)
Parameters
| Type |
Name |
Description |
| (int, int) |
indices |
|
Returns
GetClosestCell(Vector2)
Declaration
public (int, int) GetClosestCell(Vector2 worldPos)
Parameters
| Type |
Name |
Description |
| UnityEngine.Vector2 |
worldPos |
|
Returns
| Type |
Description |
| (int, int) |
|
GetCropped(int, int, int, int)
Declaration
public Cells2D<T> GetCropped(int startX, int endX, int startY, int endY)
Parameters
| Type |
Name |
Description |
| int |
startX |
|
| int |
endX |
|
| int |
startY |
|
| int |
endY |
|
Returns
GetNormalizedPos(Vector2)
Declaration
public Vector2 GetNormalizedPos(Vector2 worldPos)
Parameters
| Type |
Name |
Description |
| UnityEngine.Vector2 |
worldPos |
|
Returns
| Type |
Description |
| UnityEngine.Vector2 |
|
GetWorldPos((int, int))
Declaration
public Vector2 GetWorldPos((int, int) indices)
Parameters
| Type |
Name |
Description |
| (int, int) |
indices |
|
Returns
| Type |
Description |
| UnityEngine.Vector2 |
|
IsInBounds((int, int))
Declaration
public bool IsInBounds((int, int) indices)
Parameters
| Type |
Name |
Description |
| (int, int) |
indices |
|
Returns
Set((int, int), T)
Declaration
public void Set((int, int) indices, T value)
Parameters
| Type |
Name |
Description |
| (int, int) |
indices |
|
| T |
value |
|