Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Simplify setup_scene_once_loaded in animated_fox (bevyengine#8999)
# Objective The setup code in `animated_fox` uses a `done` boolean to avoid running the `play` logic repetitively. It is a common pattern, but it just work with exactly one fox, and misses an even more common pattern. When a user modifies the code to try it with several foxes, they are confused as to why it doesn't work (bevyengine#8996). ## Solution The more common pattern is to use `Added<AnimationPlayer>` as a query filter. This both reduces complexity and naturally extend the setup code to handle several foxes, added at any time.
- Loading branch information