Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Death animation does not end properly. #19

Open
AlejoAsd opened this issue Feb 6, 2018 · 1 comment
Open

Death animation does not end properly. #19

AlejoAsd opened this issue Feb 6, 2018 · 1 comment
Labels

Comments

@AlejoAsd
Copy link
Member

AlejoAsd commented Feb 6, 2018

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

@AlejoAsd
Copy link
Member Author

AlejoAsd commented Feb 10, 2018

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant