Esempio n. 1
0
 public PooledEntity(ComponentPools componentPools)
 {
     this._componentPools = componentPools;
 }
Esempio n. 2
0
 /**
  * Creates a new PooledEngine with a maximum of 100 entities and 100 components of each type. Use
  * {@link #PooledEngine(int, int, int, int)} to configure the entity and component pools.
  */
 public PooledEngine(List <IEntitySystem> entitySystems) : base(entitySystems)
 {
     componentPools = new ComponentPools(10, 100);
     entityPool     = new EntityPool(componentPools, 10, 100);
 }
Esempio n. 3
0
 /**
  * Creates new PooledEngine with the specified pools size configurations.
  * @param entityPoolInitialSize initial number of pre-allocated entities.
  * @param entityPoolMaxSize maximum number of pooled entities.
  * @param componentPoolInitialSize initial size for each component type pool.
  * @param componentPoolMaxSize maximum size for each component type pool.
  */
 public PooledEngine(int entityPoolInitialSize, int entityPoolMaxSize, int componentPoolInitialSize, int componentPoolMaxSize, List <IEntitySystem> entitySystems) : base(entitySystems)
 {
     componentPools = new ComponentPools(componentPoolInitialSize, componentPoolMaxSize);
     entityPool     = new EntityPool(componentPools, entityPoolInitialSize, entityPoolMaxSize);
 }
Esempio n. 4
0
 public EntityPool(ComponentPools componentPools, int initialSize, int maxSize) : base(initialSize, maxSize)
 {
     this._componentPools = componentPools;
 }