private static void HandleCoreTypeRegistered(UTinyRegistryEventType @event, IRegistryObject obj)
        {
            if (!(obj is UTinyType) || null == obj?.Registry)
            {
                return;
            }
            var type = (UTinyType)obj;

            UTinyEventDispatcher.AddListener <UTinyType.Reference, IEnumerable <UTinyEntity> >((UTinyType.Reference)type, ProcessDependency);
        }
예제 #2
0
 private static void Register()
 {
     UTinyEventDispatcher.AddListener <UTinyRegistryEventType, IRegistryObject>(UTinyRegistryEventType.Registered, HandleCoreTypeRegistered);
 }
 public static void AddListener<TEvent, TValue>(TEvent type, UTinyEventHandler<TEvent, TValue> @event)
     where TEvent : struct
     where TValue : class
 {
     UTinyEventDispatcher<TEvent>.AddListener(type, @event);
 }
예제 #4
0
        private static void RegisterChangeHandlers()
        {
            UTinyEventDispatcher <ChangeSource> .AddListener <object>(ChangeSource.DataModel, HandleDataModelChange);

            UTinyEventDispatcher <ChangeSource> .AddListener <object>(ChangeSource.SceneGraph, HandleSceneGraphChange);
        }