public async void Die() { anim.SetTrigger("isDead"); OnEnemyDiedEvent?.Invoke(); await Task.Delay(TimeSpan.FromSeconds(1)); gameObject.SetActive(false); }
private void Die() { Dispose(); OnEnemyDiedEvent?.Invoke(this); }