void OnDestroy() { onDeath.Invoke(); Player.instance.AddScore(scoreValue); if (_explosions == null) { return; } _explosions.MakeExplosion(transform.position); }
private void Die() { _player.AddScore(scoreValue); if (_explosions == null) { return; } _explosions.MakeExplosion(transform.position); Destroy(gameObject); }