Open AlejoAsd opened 6 years ago
This is because kill
is being called and super.kill()
is called within it, killing the sprite.
However, if kill is removed the animation loops endlessly. I believe this is happening because there's a loop:
kill
.kill
checks that the controller is enabled, plays the death animation and calls disableController
.enableController
. This reactivates the collision loop and the cycle repeats itself from step 1.
When dying, the character disappears after playing the whole animation.