I am struggling to figure out the best approach to support one time animations, for example an "attack" animation that needs ot play one time in completion, before being reset to a looping idle or walk animation.
The current approach i used is having a resource that has all the "last frames" of every animation, and checking if aseprite.current_frame() == last_frame. But this causes the animation to skip the full duration of the last frame, since it will return true the very first moment the animation enters the last frame, not at the completion of the last frame (which can take multiple bevy frame cycles).
How are other's supporting this, it feels like it would be a common issue
I am struggling to figure out the best approach to support one time animations, for example an "attack" animation that needs ot play one time in completion, before being reset to a looping idle or walk animation.
The current approach i used is having a resource that has all the "last frames" of every animation, and checking if
aseprite.current_frame() == last_frame. But this causes the animation to skip the full duration of the last frame, since it will return true the very first moment the animation enters the last frame, not at the completion of the last frame (which can take multiple bevy frame cycles).How are other's supporting this, it feels like it would be a common issue