Esempio n. 1
0
 /// <summary>
 /// Destroys the bomb
 /// </summary>
 protected virtual void DestroyBomb()
 {
     _renderer.enabled        = true;
     _renderer.material.color = _initialColor;
     if (_poolableObject != null)
     {
         _poolableObject.Destroy();
     }
     else
     {
         Destroy(gameObject);
     }
 }
        public virtual void Destroy()
        {
            _renderer.enabled        = true;
            _renderer.material.color = _initialColor;
            transform.SetParent(_parentPool);

            if (_poolableObject != null)
            {
                _poolableObject.Destroy();
            }
            else
            {
                Destroy();
            }
        }