public PooledEntity(ComponentPools componentPools) { this._componentPools = componentPools; }
/** * 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); }
/** * 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); }
public EntityPool(ComponentPools componentPools, int initialSize, int maxSize) : base(initialSize, maxSize) { this._componentPools = componentPools; }