Alternative to following after dead bug fix

When I did this for myself during the challenge, I just added the following to my EnemyHealth class:

        if (hitPoints <= Mathf.Epsilon)
            GetComponent<EnemyAi>().enabled = false; // this was my fix

This seemed like a straightforward way to get rid of extra animations and behaviors. Not sure if it will come back to bite me (zombie humor :D) but it’s worked so far.

1 Like

Privacy & Terms