public HierarchicalProcessor() : base(TransformComponent.Key) { rootEntities = new TrackingHashSet <Entity>(); rootEntities.CollectionChanged += rootEntities_CollectionChanged; Order = -1000; }
public EntitySystem(IServiceRegistry registry) : base(registry) { Services.AddService(typeof(EntitySystem), this); Enabled = true; Visible = true; entities = new TrackingDictionary <Entity, List <EntityProcessor> >(); enabledEntities = new TrackingHashSet <Entity>(); processors = new TrackingHashSet <EntityProcessor>(); processors.CollectionChanged += new EventHandler <TrackingCollectionChangedEventArgs>(systems_CollectionChanged); }
/// <summary> /// Initializes a new instance of the <see cref="EntityManager"/> class. /// </summary> /// <param name="registry">The registry.</param> /// <exception cref="System.ArgumentNullException">registry</exception> protected EntityManager(IServiceRegistry registry) { if (registry == null) { throw new ArgumentNullException("registry"); } Services = registry; entities = new TrackingDictionary <Entity, List <EntityProcessor> >(); enabledEntities = new TrackingHashSet <Entity>(); processors = new FastCollection <EntityProcessor>(); newProcessors = new List <EntityProcessor>(); componentTypes = new HashSet <Type>(); processorTypes = new HashSet <Type>(); }
public HierarchicalProcessor() : base(new[] { TransformationComponent.Key }) { rootEntities = new TrackingHashSet <Entity>(); rootEntities.CollectionChanged += rootEntities_CollectionChanged; }