Death() public method

public Death ( ) : void
return void
Exemplo n.º 1
0
 private void OnCollisionEnter2D(Collision2D collision)
 {
     if (collision.gameObject.tag == "Attackers")
     {
         EnemyStats EnemyStats = collision.gameObject.GetComponent <EnemyStats>();
         EnemyStats.Death();
         GetDamaged();
     }
 }
Exemplo n.º 2
0
 void Death()
 {
     agent.isStopped = true;
     animator.SetTrigger("Dead");
     enemyStats.Death(this);
     StopCoroutine(Following());
     isPlayerInRange = false;
     GameManager.Instance.OnPlayerDeath -= OnPlayerDeath;
     GameManager.Instance.OnGameRestart -= OnGameRestart;
 }