public ObservableGroupManager(IObservableGroupFactory observableGroupFactory, IEntityDatabase entityDatabase, IComponentTypeLookup componentTypeLookup) { ObservableGroupFactory = observableGroupFactory; EntityDatabase = entityDatabase; ComponentTypeLookup = componentTypeLookup; _observableGroups = new ObservableGroupLookup(); }
public EntityCollectionManager(IEntityCollectionFactory entityCollectionFactory, IObservableGroupFactory observableGroupFactory, IComponentTypeLookup componentTypeLookup) { EntityCollectionFactory = entityCollectionFactory; ObservableGroupFactory = observableGroupFactory; ComponentTypeLookup = componentTypeLookup; _observableGroups = new ObservableGroupLookup(); _collections = new CollectionLookup(); _collectionSubscriptions = new Dictionary <int, IDisposable>(); _onCollectionAdded = new Subject <IEntityCollection>(); _onCollectionRemoved = new Subject <IEntityCollection>(); _onEntityAdded = new Subject <CollectionEntityEvent>(); _onEntityRemoved = new Subject <CollectionEntityEvent>(); _onEntityComponentsAdded = new Subject <ComponentsChangedEvent>(); _onEntityComponentsRemoving = new Subject <ComponentsChangedEvent>(); _onEntityComponentsRemoved = new Subject <ComponentsChangedEvent>(); CreateCollection(PoolLookups.DefaultPoolId); }