// Update is called once per frame void Update() { if (Activations == 0) { if (_MetaObjectPool != null) { _MetaObjectPool.Deactivate(this.gameObject); } else { Destroy(this.gameObject); } } }
// Update is called once per frame void Update() { TimerLifetime += Time.deltaTime; if (TimerLifetime > Lifetime) { if (_MetaObjectPool != null) { _MetaObjectPool.Deactivate(this.gameObject); } else { Destroy(this.gameObject); } } }
IEnumerator Kill() { if (DeathAnimationTime != 0) { yield return(new WaitForSeconds(DeathAnimationTime)); } if (_MetaObjectPool != null) { _MetaObjectPool.Deactivate(this.gameObject); } else { Destroy(this.gameObject); } }