private void Awake() { IFactory <GameObject> objectFactory = new BaseGameObjectFactory(_gameObjectPrefab, Parent); IStore <GameObject> unusedObjectStore = new BaseListStore <GameObject>(); IStore <GameObject> usedObjectStore = new BaseListStore <GameObject>(); IDisposer <GameObject> objectDisposer = new BaseGameObjectDisposer(); int maximumCapacity = _maximumCapacity > 0 ? _maximumCapacity : int.MaxValue; Pooler = new BasePooler <GameObject>( objectFactory, unusedObjectStore, usedObjectStore, objectDisposer, maximumCapacity); if (_initialCapacity > 0) { Pooler.EnsureCapacity(_initialCapacity); } }
public void SetUp() { _baseListStore = new BaseListStore <string>(); }