You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This means if your app wants to pause animations, e.g. when the player presses Pause, the app would have to iterate all animations and pause them itself.
I think it would be better if the plugin received a run_if condition which can be used to determine if the animation system should run. I'd use this to pass run_if(in_state(Unpaused)) to the plugin.
I'll need to check if a run condition is the correct way to do this. I just saw https://github.com/bevyengine/bevy/blob/6659f37df1522fd2f927b2afb28ce779cfe3c999/examples/time/virtual_time.rs#L171-L177 and it seems like maybe using VirtualTime could be the correct approach here. Not sure what happens if you want to have some animations working while paused, and some not working. I also need to check how bevy_animation supports or doesn't support this because I'd imagine that bevy_spritesheet_animation should do the same thing.
The play animation system always runs:
bevy_spritesheet_animation/src/plugin.rs
Line 75 in bf5861f
This means if your app wants to pause animations, e.g. when the player presses Pause, the app would have to iterate all animations and pause them itself.
I think it would be better if the plugin received a
run_if
condition which can be used to determine if the animation system should run. I'd use this to passrun_if(in_state(Unpaused))
to the plugin.I imagine the implementation would look similar to this: https://github.com/jakobhellermann/bevy-inspector-egui/blob/eaf1ec72819d82254b8de9236246450d86dd2bc1/crates/bevy-inspector-egui/src/quick.rs#L71
WDYT?
The text was updated successfully, but these errors were encountered: