Class CallbacksRegister
Namespace: TycoonTerrain.Core
Assembly: TycoonTerrainAssembly.dll
Syntax
public class CallbacksRegister
Constructors
CallbacksRegister()
Declaration
public CallbacksRegister()
Methods
GetCallbacksForBounds(IntBound)
Get all the callbacks that lie within a given bounds.
Declaration
public IEnumerable<OnBoundsChangeCallback> GetCallbacksForBounds(IntBound bounds)
Parameters
Type | Name | Description |
---|---|---|
IntBound | bounds | The bounds to check against. |
Returns
Type | Description |
---|---|
IEnumerable<OnBoundsChangeCallback> |
GetCallbacksForBounds(int2)
Get all the callbacks that lie within a given bounds.
Declaration
public IEnumerable<OnBoundsChangeCallback> GetCallbacksForBounds(int2 position)
Parameters
Type | Name | Description |
---|---|---|
Unity.Mathematics.int2 | position | The position to check against. |
Returns
Type | Description |
---|---|
IEnumerable<OnBoundsChangeCallback> |
IsHandleRegistered(CallbackHandle)
Returns whether the given callback handle is currently registered in this collection.
Declaration
public bool IsHandleRegistered(CallbackHandle handle)
Parameters
Type | Name | Description |
---|---|---|
CallbackHandle | handle | The handle. |
Returns
Type | Description |
---|---|
Boolean |
Register(IntBound, OnBoundsChangeCallback)
Adds the given callback handler to the collection.
Declaration
public CallbackHandle Register(IntBound bounds, OnBoundsChangeCallback callback)
Parameters
Type | Name | Description |
---|---|---|
IntBound | bounds | The bounds. |
OnBoundsChangeCallback | callback | The callback. |
Returns
Type | Description |
---|---|
CallbackHandle |
Unregister(CallbackHandle)
Removes the callback and its bounds from the collection.
Declaration
public void Unregister(CallbackHandle handle)
Parameters
Type | Name | Description |
---|---|---|
CallbackHandle | handle |