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

Fix bug related to once animations #7

Merged
merged 2 commits into from
Jul 26, 2021

Conversation

thedodd
Copy link
Contributor

@thedodd thedodd commented Jul 23, 2021

If we do not set self.current_frame = 0; when a Once animation has finished, then the animation is never able to be executed again.

With this update, the animation is able to be properly restarted next time the Play component is added to the corresponding entity.

If we do not set `self.current_frame = 0;` when a `Once` animation has finished, then the animation is never able to be executed again.

With this update, the animation is able to be properly restarted next time the `Play` component is added to the corresponding entity.
@jcornaz
Copy link
Owner

jcornaz commented Jul 25, 2021

Good catch, thanks :-)

Do you mind adding a test for this case? Otherwise don't worry I'll add it myself ;-)

Copy link
Owner

@jcornaz jcornaz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added the test ;-)

Thanks @thedodd for your contribution ;-)

@jcornaz jcornaz enabled auto-merge (squash) July 26, 2021 08:20
@jcornaz jcornaz merged commit 4c7b5ad into jcornaz:main Jul 26, 2021
@thedodd
Copy link
Contributor Author

thedodd commented Jul 26, 2021

@jcornaz thanks boss! Thanks for the great work here!

@thedodd thedodd deleted the bug-with-once-animations branch July 26, 2021 14:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants