예제 #1
0
    public async void Die()
    {
        anim.SetTrigger("isDead");
        OnEnemyDiedEvent?.Invoke();
        await Task.Delay(TimeSpan.FromSeconds(1));

        gameObject.SetActive(false);
    }
예제 #2
0
 private void Die()
 {
     Dispose();
     OnEnemyDiedEvent?.Invoke(this);
 }