Jump to content
  • Advertisement
Sign in to follow this  
kzar

Making animations die

This topic is 4637 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi in my animation class I added a loop option so you can make an animation only play through once or carry on forever. But I would like to make it so if the animation only plays once at the end it is removed. I searched around a bit and I read that making class's "suicide" is bad practice for a few different reasons. So how could I do this? Thanks, David

Share this post


Link to post
Share on other sites
Advertisement
mark your animation as "dead" (bool alive=false) and dont update/render/etc. dead animations. remove dead animations from animation list after update/render loop.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!