bevy/examples/animation
Nicola Papale fd32c6f0ec
Simplify setup_scene_once_loaded in animated_fox (#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 (#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.
2023-06-29 20:21:07 +00:00
..
animated_fox.rs Simplify setup_scene_once_loaded in animated_fox (#8999) 2023-06-29 20:21:07 +00:00
animated_transform.rs Fixed several missing links in docs. (#8117) 2023-04-23 17:28:36 +00:00
cubic_curve.rs Adding a bezier curve example (#8194) 2023-04-17 16:16:56 +00:00
custom_skinned_mesh.rs Schedule-First: the new and improved add_systems (#8079) 2023-03-18 01:45:34 +00:00
gltf_skinned_mesh.rs Schedule-First: the new and improved add_systems (#8079) 2023-03-18 01:45:34 +00:00
morph_targets.rs Add morph targets (#8158) 2023-06-22 20:00:01 +00:00