djeedai / bevy_tweening

Tweening animation plugin for the Bevy game engine.
Other
419 stars 67 forks source link

Add example for tick() #88

Closed AngeloMateus closed 8 months ago

AngeloMateus commented 1 year ago

Could you add an example for calling tick()?

I have no idea what Targetable needs: tween.tick(Duration::ZERO, ???, e, &mut writer);

djeedai commented 1 year ago

Yes we could add that. Although really Tweenable::tick() is not really designed to be used manually by default; instead the component_animator_system() will call it automatically. You can have a look at its implementation to understand how tick() should be called:

https://github.com/djeedai/bevy_tweening/blob/54ea43270d49722f9563d336c664d71b41f8c7eb/src/plugin.rs#L85-L107