Beispiel #1
0
 public void ReturnAll()
 {
     for (int i = activeObjects.Count - 1; i >= 0; i--)
     {
         IPooled pooled = activeObjects[i] as IPooled;
         pooled.ReturnToPool();
     }
 }
Beispiel #2
0
        private void AddInstanceToPool()
        {
            IPooled item = createInstanceHandler();

            item.Init(this);
            activeItems.Add(item);
            item.ReturnToPool();
        }