Ejemplo n.º 1
0
        internal void InitModule(Action <Entity> applyLogicsAction)
        {
            _applyLogicsAction = applyLogicsAction;

            EntityTracker tracker = EntityTracker.Instance;

            tracker.EntityTrackedEvent                      += OnEntityTrackedEvent;
            tracker.EntityUntrackedEvent                    += OnEntityUntrackedEvent;
            tracker.EntityAddedComponentEvent               += OnEntityAddedComponentEvent;
            tracker.EntityRemovedComponentEvent             += OnEntityRemovedComponentEvent;
            tracker.EntityComponentEnabledStateChangedEvent += OnEntityComponentEnabledStateChangedEvent;
        }
Ejemplo n.º 2
0
 internal void DeInitModule()
 {
     if (EntityTracker.IsAvailable)
     {
         EntityTracker tracker = EntityTracker.Instance;
         tracker.EntityTrackedEvent                      -= OnEntityTrackedEvent;
         tracker.EntityUntrackedEvent                    -= OnEntityUntrackedEvent;
         tracker.EntityAddedComponentEvent               -= OnEntityAddedComponentEvent;
         tracker.EntityRemovedComponentEvent             -= OnEntityRemovedComponentEvent;
         tracker.EntityComponentEnabledStateChangedEvent -= OnEntityComponentEnabledStateChangedEvent;
     }
 }