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

Add Animation::is_finished #315

Merged

Conversation

vrmiguel
Copy link
Contributor

@vrmiguel vrmiguel commented Jul 11, 2022

Hey there 👋 Congrats on this project 😃

This PR proposes Animation::is_finished and Animation::has_frames_remaining.

Motivation

This allows us to quickly get rid of "one-off" animations, such as an explosion, damage indicator or whatnot

let is_not_finished = |anim| anim.is_finished().not();

animations.retain(is_not_finished);

@17cupsofcoffee
Copy link
Owner

Sorry for the massive delay in replying to this, I've been a bit burned out on open source for a while! Finally trying to work through the backlog...

This looks like a sensible feature to add, and low maintainence burden, so I'm fine with merging this 👍

@17cupsofcoffee 17cupsofcoffee merged commit 5ef32af into 17cupsofcoffee:main Sep 3, 2022
@17cupsofcoffee
Copy link
Owner

Thank you!

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