public Pool(PoolParameters param) { m_Prefab = param.Prefab; m_Parent = param.Parent; m_ActiveObjects = new List <T>(5); m_DeactiveObjects = new List <T>(5); }
public ReactivePool(PoolParameters param) { m_Prefab = param.Prefab; m_Parent = param.Parent; m_PooledObjects = new ReactiveCollection <T>(); m_PooledObjects .ObserveAdd() .Subscribe(AddInCollection); m_PooledObjects .ObserveRemove() .Subscribe(RemoveAtCollection); }