public void TakeDamage(float dmg) { health -= dmg; if (health <= 0) { ui.UpdatePoints(); objectPooler.ReturnToPool(gameObject); //Destroy(gameObject); } }
public void TakeDamage(float dmg) { health -= dmg; if (health <= 0) { ui.UpdatePoints(); objectPooler.ReturnToPool(gameObject); //Destroy(gameObject); } }