public ObservableGroupManager(IObservableGroupFactory observableGroupFactory, IEntityDatabase entityDatabase, IComponentTypeLookup componentTypeLookup) { ObservableGroupFactory = observableGroupFactory; EntityDatabase = entityDatabase; ComponentTypeLookup = componentTypeLookup; _observableGroups = new ObservableGroupLookup(); }
public EntityCollectionManager(IEventSystem eventSystem, IEntityCollectionFactory entityCollectionFactory, IObservableGroupFactory observableGroupFactory) { EventSystem = eventSystem; EntityCollectionFactory = entityCollectionFactory; ObservableGroupFactory = observableGroupFactory; _groupAccessors = new Dictionary <ObservableGroupToken, IObservableGroup>(); _pools = new Dictionary <string, IEntityCollection>(); CreateCollection(DefaultPoolName); }
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); }
public EntityCollectionManager(IEntityCollectionFactory collectionFactory, IObservableGroupFactory groupFactory, IComponentTypeLookup componentTypeLookup) { CollectionFactory = collectionFactory; GroupFactory = groupFactory; ComponentTypeLookup = componentTypeLookup; observableGroups = new Dictionary <ObservableGroupToken, IObservableGroup>(); collections = new Dictionary <string, IEntityCollection>(); subscriptions = new Dictionary <string, IDisposable>(); entityAdded = new Subject <CollectionEntityEvent>(); entityRemoved = new Subject <CollectionEntityEvent>(); entityComponentsAdded = new Subject <ComponentsChangedEvent>(); entityComponentsRemoving = new Subject <ComponentsChangedEvent>(); entityComponentsRemoved = new Subject <ComponentsChangedEvent>(); collectionAdded = new Subject <IEntityCollection>(); collectionRemoved = new Subject <IEntityCollection>(); CreateCollection(DefaultPoolName); }