Example #1
0
 public void ReturnToPool(bool skipRemoveFromList = false)
 {
     ExecuteParticle();
     AudioManager.GetInstance().PlaySoundAtPosition(despawnClip, transform);
     if (ActiveHand)
     {
         ActiveHand.Drop();
     }
     if (Placement)
     {
         Placement.RemovePlacedObject();
     }
     PoolManager.ReturnOrnament(this, skipRemoveFromList);
 }
Example #2
0
 private void OnDestroy()
 {
     //Debug.Log("On Destroy");
     //if (isQuitting) throw new System.Exception("Test");
     IsBeingDestroyed = true;
     if (ActiveHand != null)
     {
         ActiveHand.Drop();
     }
     if (!isQuitting)
     {
         ExecuteParticle();
         if (audioManager)
         {
             audioManager.PlaySoundAtPosition(despawnClip, transform);
         }
     }
 }