Adapter for static dispatchers in Unity. Provides utility static methods, internal worker that removes dead listeners and means for creating a dispatcher. More...
Static Public Member Functions | |
static void | Clear () |
Removes all listeners and destroys the worker object. More... | |
static void | RemoveDeadListeners () |
Removes dead listeners from the dispatcher. More... | |
static DispatcherSubscription | Subscribe< TDispatchable > (Object listener, DispatchableHandler< TDispatchable > handler, DeterministicGameMode gameMode, bool exclude=false, bool once=false, bool onlyIfActiveAndEnabled=false, bool onlyIfEntityViewBound=false) |
Creates a subscription. The subscription lifetime is tied to the listener object, unless explicitly unsubscribed. More... | |
static DispatcherSubscription | Subscribe< TDispatchable > (Object listener, DispatchableHandler< TDispatchable > handler, DeterministicGameMode[] gameModes, bool exclude=false, bool once=false, bool onlyIfActiveAndEnabled=false, bool onlyIfEntityViewBound=false) |
Creates a subscription. The subscription lifetime is tied to the listener object, unless explicitly unsubscribed. More... | |
static DispatcherSubscription | Subscribe< TDispatchable > (Object listener, DispatchableHandler< TDispatchable > handler, DispatchableFilter filter=null, bool once=false, bool onlyIfActiveAndEnabled=false, bool onlyIfEntityViewBound=false) |
Creates a subscription. The subscription lifetime is tied to the listener object, unless explicitly unsubscribed. More... | |
static DispatcherSubscription | Subscribe< TDispatchable > (Object listener, DispatchableHandler< TDispatchable > handler, QuantumGame game, bool once=false, bool onlyIfActiveAndEnabled=false, bool onlyIfEntityViewBound=false) |
Creates a subscription. The subscription lifetime is tied to the listener object, unless explicitly unsubscribed. More... | |
static DispatcherSubscription | Subscribe< TDispatchable > (Object listener, DispatchableHandler< TDispatchable > handler, QuantumRunner runner, bool once=false, bool onlyIfActiveAndEnabled=false, bool onlyIfEntityViewBound=false) |
Creates a subscription. The subscription lifetime is tied to the listener object, unless explicitly unsubscribed. More... | |
static DispatcherSubscription | Subscribe< TDispatchable > (Object listener, DispatchableHandler< TDispatchable > handler, string runnerId, bool once=false, bool onlyIfActiveAndEnabled=false, bool onlyIfEntityViewBound=false) |
Creates a subscription. The subscription lifetime is tied to the listener object, unless explicitly unsubscribed. More... | |
static IDisposable | SubscribeManual< TDispatchable > (DispatchableHandler< TDispatchable > handler, DispatchableFilter filter=null, bool once=false) |
static IDisposable | SubscribeManual< TDispatchable > (DispatchableHandler< TDispatchable > handler, IDeterministicGame game, bool once=false) |
static IDisposable | SubscribeManual< TDispatchable > (object listener, DispatchableHandler< TDispatchable > handler, DispatchableFilter filter=null, bool once=false) |
static bool | Unsubscribe (DispatcherSubscription subscription) |
static bool | Unsubscribe (ref DispatcherSubscription subscription) |
static bool | UnsubscribeListener (object listener) |
static bool | UnsubscribeListener< TDispatchable > (object listener) |
Properties | |
static TDispatcher | Dispatcher = new TDispatcher() [get] |
The dispatcher instance. More... | |
Adapter for static dispatchers in Unity. Provides utility static methods, internal worker that removes dead listeners and means for creating a dispatcher.
TDispatcher | |
TDispatchableBase |
TDispatcher | : | DispatcherBase | |
TDispatcher | : | IQuantumUnityDispatcher | |
TDispatcher | : | new() | |
TDispatchableBase | : | IDispatchable |
|
inlinestatic |
Removes all listeners and destroys the worker object.
|
inlinestatic |
Removes dead listeners from the dispatcher.
|
inlinestatic |
Creates a subscription. The subscription lifetime is tied to the listener object, unless explicitly unsubscribed.
TDispatchable |
listener | An object listening. Used to unsubscribe all subscriptions when the object is destroyed. |
handler | Actual event handler. |
once | Call handler only once. |
filter | Optional event filter. If returns false, handler will not be invoked. |
onlyIfActiveAndEnabled | Only invoke handler if the listener is active and enabled |
onlyIfEntityViewBound | Only invoke handler if the listener QuantumEntityView component and it is bound to an entity |
TDispatchable | : | TDispatchableBase |
|
inlinestatic |
Creates a subscription. The subscription lifetime is tied to the listener object, unless explicitly unsubscribed.
TDispatchable |
listener | An object listening. Used to unsubscribe all subscriptions when the object is destroyed. |
handler | Actual event handler. |
once | Call handler only once. |
gameMode | Only invoke for a specific game mode |
exclude | If true, the handler will be invoked for all game modes except the specified one |
onlyIfActiveAndEnabled | Only invoke handler if the listener is active and enabled |
onlyIfEntityViewBound | Only invoke handler if the listener QuantumEntityView component and it is bound to an entity |
TDispatchable | : | TDispatchableBase |
|
inlinestatic |
Creates a subscription. The subscription lifetime is tied to the listener object, unless explicitly unsubscribed.
TDispatchable |
listener | An object listening. Used to unsubscribe all subscriptions when the object is destroyed. |
handler | Actual event handler. |
once | Call handler only once. |
gameModes | Only invoke for specific game modes |
exclude | If true, the handler will be invoked for all game modes except the specified ones |
onlyIfActiveAndEnabled | Only invoke handler if the listener is active and enabled |
onlyIfEntityViewBound | Only invoke handler if the listener QuantumEntityView component and it is bound to an entity |
TDispatchable | : | TDispatchableBase |
|
inlinestatic |
Creates a subscription. The subscription lifetime is tied to the listener object, unless explicitly unsubscribed.
TDispatchable |
listener | An object listening. Used to unsubscribe all subscriptions when the object is destroyed. |
handler | Actual event handler. |
once | Call handler only once. |
runnerId | Only invoke for a QuantumRunner with a specific ID |
onlyIfActiveAndEnabled | Only invoke handler if the listener is active and enabled |
onlyIfEntityViewBound | Only invoke handler if the listener QuantumEntityView component and it is bound to an entity |
TDispatchable | : | TDispatchableBase |
|
inlinestatic |
Creates a subscription. The subscription lifetime is tied to the listener object, unless explicitly unsubscribed.
TDispatchable |
listener | An object listening. Used to unsubscribe all subscriptions when the object is destroyed. |
handler | Actual event handler. |
once | Call handler only once. |
runner | Only invoke for a QuantumRunner instance |
onlyIfActiveAndEnabled | Only invoke handler if the listener is active and enabled |
onlyIfEntityViewBound | Only invoke handler if the listener QuantumEntityView component and it is bound to an entity |
TDispatchable | : | TDispatchableBase |
|
inlinestatic |
Creates a subscription. The subscription lifetime is tied to the listener object, unless explicitly unsubscribed.
TDispatchable |
listener | An object listening. Used to unsubscribe all subscriptions when the object is destroyed. |
handler | Actual event handler. |
once | Call handler only once. |
game | Only invoke for a QuantumGame instance |
onlyIfActiveAndEnabled | Only invoke handler if the listener is active and enabled |
onlyIfEntityViewBound | Only invoke handler if the listener QuantumEntityView component and it is bound to an entity |
TDispatchable | : | TDispatchableBase |
|
staticget |
The dispatcher instance.