public void ReturnToPool(bool skipRemoveFromList = false) { ExecuteParticle(); AudioManager.GetInstance().PlaySoundAtPosition(despawnClip, transform); if (ActiveHand) { ActiveHand.Drop(); } if (Placement) { Placement.RemovePlacedObject(); } PoolManager.ReturnOrnament(this, skipRemoveFromList); }
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); } } }