Пример #1
0
 protected void SubscribeLocalEvent <T>(
     EntityEventRefHandler <T> handler,
     Type[]?before = null, Type[]?after = null)
     where T : notnull
 {
     SubEvent(EventSource.Local, handler, before, after);
 }
Пример #2
0
        private void SubEvent <T>(
            EventSource src,
            EntityEventRefHandler <T> handler,
            Type[]?before, Type[]?after)
            where T : notnull
        {
            EntityManager.EventBus.SubscribeEvent(src, this, handler, GetType(), before, after);

            _subscriptions ??= new();
            _subscriptions.Add(new SubBroadcast <T>(src));
        }