Method | Description | |
---|---|---|
Clear ( ) : void |
Clears all event handlers.
|
|
Dispose ( ) : void |
Destructor.
|
|
GetSingleton ( object key ) : IEventBus |
Retrieves a singleton instance of an event-bus with the given key.
|
|
Subscribe ( |
Adds a handler for a specific event type.
|
|
Unsubscribe ( System.Action handler ) : void |
Removes a handler.
|
Method | Description | |
---|---|---|
EventBus ( object key ) : System |
Constructor.
|
|
GetHandler ( System.Action handler ) : |
public static GetSingleton ( object key ) : IEventBus | ||
key | object | The unique identifier of the event-bus. |
return | IEventBus |
public Subscribe ( |
||
eventType | The type of the event. | |
handler | System.Action | The handler to invoke when the event is fired. |
return | void |
public Unsubscribe ( System.Action handler ) : void | ||
handler | System.Action | The event handle to unsubscribe. |
return | void |