Ejemplo n.º 1
0
 public Pool(PoolParameters param)
 {
     m_Prefab          = param.Prefab;
     m_Parent          = param.Parent;
     m_ActiveObjects   = new List <T>(5);
     m_DeactiveObjects = new List <T>(5);
 }
Ejemplo n.º 2
0
 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);
 }