Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

foxes shouldn't march in sync #10070

Merged
merged 3 commits into from
Oct 9, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
foxes shouldn't march in sync
mockersf committed Oct 9, 2023
commit 0e617b27085c0b8e3daa6b33d64cc3244b271f96
6 changes: 3 additions & 3 deletions examples/stress_tests/many_foxes.rs
Original file line number Diff line number Diff line change
@@ -200,12 +200,12 @@ fn setup(
fn setup_scene_once_loaded(
animations: Res<Animations>,
foxes: Res<Foxes>,
mut player: Query<&mut AnimationPlayer>,
mut player: Query<(Entity, &mut AnimationPlayer)>,
mut done: Local<bool>,
) {
if !*done && player.iter().len() == foxes.count {
for mut player in &mut player {
player.play(animations.0[0].clone_weak()).repeat();
for (entity, mut player) in &mut player {
player.play(animations.0[0].clone_weak()).repeat().seek_to(entity.index() as f32 / 10.0);
}
*done = true;
}