Class BoundsContainer
Stores bounds and enables for easy retrieval of bounds within a certain position or bounds.
Namespace: TycoonTerrain.Core
Assembly: TycoonTerrainAssembly.dll
Syntax
public class BoundsContainer
Constructors
BoundsContainer()
Declaration
public BoundsContainer()
Methods
Clear()
Clears all the bounds from the container.
Declaration
public void Clear()
GetBoundsFor(Int32)
Returns the bounds registered for a given identifier.
Declaration
public IntBound GetBoundsFor(int id)
Parameters
Type | Name | Description |
---|---|---|
Int32 | id | The indentifier. |
Returns
Type | Description |
---|---|
IntBound |
GetIdsInTile(int2)
Get all the callbacks that lie within a given bounds.
Declaration
public IEnumerable<int> GetIdsInTile(int2 position)
Parameters
Type | Name | Description |
---|---|---|
Unity.Mathematics.int2 | position | The position to check against. |
Returns
Type | Description |
---|---|
IEnumerable<Int32> |
GetIdsWithinBounds(IntBound)
Get all the callbacks that lie within a given bounds.
Declaration
public IEnumerable<int> GetIdsWithinBounds(IntBound bounds)
Parameters
Type | Name | Description |
---|---|---|
IntBound | bounds | The bounds to check against. |
Returns
Type | Description |
---|---|
IEnumerable<Int32> |
IsHandleRegistered(Int32)
Returns whether the given callback handle is currently registered in this collection.
Declaration
public bool IsHandleRegistered(int id)
Parameters
Type | Name | Description |
---|---|---|
Int32 | id |
Returns
Type | Description |
---|---|
Boolean |
Register(Int32, IntBound)
Adds the given callback handler to the collection.
Declaration
public bool Register(int id, IntBound bounds)
Parameters
Type | Name | Description |
---|---|---|
Int32 | id | |
IntBound | bounds | The bounds. |
Returns
Type | Description |
---|---|
Boolean |
Unregister(Int32)
Removes the callback and its bounds from the collection.
Declaration
public void Unregister(int id)
Parameters
Type | Name | Description |
---|---|---|
Int32 | id |