proper for loop

main
Zynh Ludwig 2024-09-01 15:14:47 -07:00
parent edc9b376b9
commit 0803b9d611
1 changed files with 2 additions and 2 deletions

View File

@ -26,9 +26,9 @@ struct BoidBundle {
}
fn move_boids(mut boids: Query<(&mut Transform, &Velocity), With<Boid>>, time: Res<Time>) {
boids.iter_mut().for_each(|(mut transform, velocity)| {
for (mut transform, velocity) in &mut boids {
transform.translation += velocity.0 * time.delta_seconds();
});
}
}
fn setup(