• Advertisement
Sign in to follow this  

Making animations die

This topic is 4455 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