Skip to content

Best way to handle animations that need to play once (how to check if animation is done) #32

@RaminKav

Description

@RaminKav

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions