private void Update() { if (_health <= 0) { if (gameObject.CompareTag("Enemy")) { EnemyDeath(); ObjectPool.Instance.PoolObject(gameObject); } if (CompareTag("Player")) { _onDeath.Death(); } } if (!CompareTag("Player")) { return; } if (_health >= 7 || _counter >= Time.time) { return; } _counter = Time.time + _delay; _health++; }