protected void SubscribeAllEvent <T>( EntitySessionEventHandler <T> handler, Type[]?before = null, Type[]?after = null) where T : notnull { SubSessionEvent(EventSource.All, handler, before, after); }
protected void SubscribeLocalEvent <T>(EntitySessionEventHandler <T> handler) where T : notnull { EntityManager.EventBus.SubscribeSessionEvent(EventSource.Local, this, handler); _subscriptions ??= new(); _subscriptions.Add(new SubBroadcast <EntitySessionMessage <T> >(EventSource.Local)); }
public void SubSessionEvent <T>( EventSource src, EntitySessionEventHandler <T> handler, Type[]?before = null, Type[]?after = null) where T : notnull { System.SubSessionEvent(src, handler, before, after); }
public static void SubscribeSessionEvent <T>( this IEventBus eventBus, EventSource source, IEntityEventSubscriber subscriber, EntitySessionEventHandler <T> handler) { var wrapper = new HandlerWrapper <T>(handler); eventBus.SubscribeEvent <EntitySessionMessage <T> >(source, subscriber, wrapper.Invoke); }
private void SubSessionEvent <T>( EventSource src, EntitySessionEventHandler <T> handler, Type[]?before, Type[]?after) where T : notnull { EntityManager.EventBus.SubscribeSessionEvent(src, this, handler, GetType(), before, after); _subscriptions ??= new(); _subscriptions.Add(new SubBroadcast <EntitySessionMessage <T> >(src)); }
public static void SubscribeSessionEvent <T>( this IEventBus eventBus, EventSource source, IEntityEventSubscriber subscriber, EntitySessionEventHandler <T> handler, Type orderType, Type[]?before = null, Type[]?after = null) { var wrapper = new HandlerWrapper <T>(handler); eventBus.SubscribeEvent <EntitySessionMessage <T> >( source, subscriber, wrapper.Invoke, orderType, before, after); }
public HandlerWrapper(EntitySessionEventHandler <T> handler) { Handler = handler; }
protected void SubscribeLocalEvent <T>(EntitySessionEventHandler <T> handler) where T : EntitySystemMessage { EntityManager.EventBus.SubscribeSessionEvent(EventSource.Local, this, handler); }
protected void SubscribeNetworkEvent <T>(EntitySessionEventHandler <T> handler) where T : notnull { EntityManager.EventBus.SubscribeSessionEvent(EventSource.Network, this, handler); }