Skip to content

Do something at the end of the animation #48

Answered by Multirious
Rockson asked this question in Q&A
Discussion options

You must be logged in to vote

3 ways:

  • Use TimeRunnerEnded event
  • Use TweenEvent<D> event via bevy_tween::combinator::event*. Note that you also have to register the plugin. Then you can add the event to your animation and read them.
  • Custom component and system by querying for TimeSpanProgress. It will only be inserted for 1 frame if the span length is 0.
    Then define its animation constructor. You can see how to make one from the above function's source. This work the same way as TweenEvent's system.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by Rockson
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #47 on February 15, 2025 09:32.