Hello,
I am here to ask for the question, after health <= 0 the death animation is playing but the attacker does not pass until my defender destroys completely himself. I tried to Destroy boxcollider2d in
if(health<=0)
{
GetComponent<Animator>().SetTrigger("Die");
Destroy(gameObject.GetComponent<BoxCollider2D>());
Destroy(healthBar.gameObject);
Destroy(gameObject, 5f);
}
death animation of defender still its not working.