protected override void AddItem(EntityProcessor processor) { if (processor == null) { throw new ArgumentNullException(nameof(processor)); } if (!Contains(processor)) { if (preventPhysicsProcessor && processor.MainTypeName == "PhysicsComponent") { return; // don't use Bullet physics, bepu only! } base.AddItem(processor); manager.OnProcessorAdded(processor); } }
private void OnProcessorRemoved(EntityProcessor processor) { // Remove the procsesor from any list foreach (var componentTypeAndProcessors in MapComponentTypeToProcessors) { var processorList = componentTypeAndProcessors.Value; processorList.Remove(processor); if (processorList.Dependencies != null) { processorList.Dependencies.Remove(processor); } } processor.RemoveAllEntities(); processor.OnSystemRemove(); processor.Services = null; processor.EntityManager = null; }