Closed CristovoXDGM closed 1 month ago
@spydon Man, can you help with that ? or is better to use rive instead to have the state machine ?
@spydon Man, can you help with that ? or is better to use rive instead to have the state machine ?
I would say in general I would choose Rive over Lottie, but if you want to do a PR with a callback or completer you can have a look at how it is done for the SpriteAnimationComponent
for example.
I just had a look, and you can already do this.
Since you can pass in an EffectController
you can add an onMax
callback to that one which will be called when the animation is done. :)
Problem to solve
Currently there is no way to check if a LottieComponent has finished their animation to trigger something.
Proposal
Would be good to have that, so we can be able to chain things related to animations. One use for that is to use more lottie animations for games since their are lightweight.
More information
I know how to do that in flutter using a completer and a listener for the animation, but it seens to vsync not work for flame components
Other