genba-games / morsemadness

Transmission team ADKL
https://berith.itch.io/m-m
GNU General Public License v3.0
5 stars 1 forks source link

Death animation does not end properly. #19

Open AlejoAsd opened 6 years ago

AlejoAsd commented 6 years ago

When dying, the character disappears after playing the whole animation.

AlejoAsd commented 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:

  1. Collision with lava calls kill.
  2. kill checks that the controller is enabled, plays the death animation and calls disableController.
  3. Some external code is calling enableController. This reactivates the collision loop and the cycle repeats itself from step 1.