public void DeathBehaviour() { Agent.velocity = Vector3.zero; EnemyAnimator.SetBool("Dead", true); BoxCollider.enabled = false; Joints.SetActive(false); Agent.radius = 0; PlayDeathGrowl(); OnKill(); }
IEnumerator DeathBehaviour() { Agent.velocity = Vector3.zero; yield return(new WaitForSeconds(0.1f)); EnemyAnimator.SetBool("Dead", true); BoxCollider.enabled = false; Joints.SetActive(false); Agent.radius = 0; PlayDeathGrowl(); OnKill(); }