Пример #1
0
 public void ReturnToPool()
 {
     _isInPool = true;
     gameObject.SetActive(false);
     if (_pool != null)
     {
         _pool.ReturnPoolable(this);
     }
     else
     {
         Destroy(gameObject);
     }
 }
Пример #2
0
        public void ReturnToPool(IPoolable poolable)
        {
            Pool poolInst = GetOrCreatePool();

            poolInst.ReturnPoolable(poolable);
        }