EventBus
Namespace Mc.Scripting · Kind class (static)
public static class EventBusOwner-less event firing helpers.
Methods
Section titled “Methods”| Member | Description |
|---|---|
static bool Fire<T>(ref T ev) where T : struct, IEvent |
Fires an event through the native bus; returns false if it was cancelled. |
static bool HasSubscribers<T>() where T : struct, IEvent |
Whether anybody (native or managed) listens to T. |
Fire<T>
Section titled “Fire<T>”public static bool Fire<T>(ref T ev) where T : struct, IEventFires an event through the native bus; returns false if it was cancelled.
Parameters
| Name | Type | Description |
|---|---|---|
ev |
ref T |
Returns bool
HasSubscribers<T>
Section titled “HasSubscribers<T>”public static bool HasSubscribers<T>() where T : struct, IEventWhether anybody (native or managed) listens to T.
Returns bool