Example #1
0
 public void RemoveItem(PoolObject obj)
 {
     remItemsLst.Add(obj);
 }
Example #2
0
 public void ReturnToPool(PoolObject obj)
 {
     lifeTimeContr.RemoveItem(obj);
     obj.GameObject.SetActive(false);
     pool[obj.EntityRef].Pool.Enqueue(obj);
 }
Example #3
0
 public void AddNewItem(PoolObject obj)
 {
     addItemsLst.Add(obj);
 }
Example #4
0
 private void removeItem(PoolObject obj)
 {
     LiveItems[obj.EntityRef.EntityType].Remove(obj);
 }
Example #5
0
 private void addNewItem(PoolObject obj)
 {
     LiveItems[obj.EntityRef.EntityType].Add(obj);
 }
Example #6
0
 public void ReturnObject(PoolObject obj)
 {
     objects.Enqueue(obj);
     obj.OnReturnedToPool();
 }
Example #7
0
 public Pool(string path)
 {
     this.path = path;
     asset     = Resources.Load <PoolObject>(path);
     objects   = new Queue <PoolObject>();
 }