fn move_scene_entities(
    time: Res<Time>,
    mut scene_entities: Query<&mut Transform, With<EntityInMyScene>>,
) {
    let mut direction = 1.;
    let mut scale = 1.;
    for mut transform in scene_entities.iter_mut() {
        transform.translation = Vec3::new(
            scale * direction * time.seconds_since_startup().sin() as f32 / 20.,
            0.,
            time.seconds_since_startup().cos() as f32 / 20.,
        );
        direction *= -1.;
        scale += 0.5;
    }
}
// This system will move all entities with component `EntityInMyScene`, so all
// entities from the second scene
This system will move all entities with component `EntityInMyScene`, so all
entities from the second scene
This system will move all entities with component ` EntityInMyScene ` so all entities from the second scene
fn move_scene_entities(
    time: Res<Time>,
    mut scene_entities: Query<&mut Transform, With<EntityInMyScene>>,
) {
    let mut direction = 1.;
    let mut scale = 1.;
    for mut transform in scene_entities.iter_mut() {
        transform.translation = Vec3::new(
            scale * direction * time.seconds_since_startup().sin() as f32 / 20.,
            0.,
            time.seconds_since_startup().cos() as f32 / 20.,
        );
        direction *= -1.;
        scale += 0.5;
    }
}
fn move_scene_entities ( time : Res < Time > , mut scene_entities : Query < & mut Transform , With < EntityInMyScene > > , ) { let mut direction = 1. ; let mut scale = 1. ; for mut transform in scene_entities . iter_mut ( ) { transform . translation = Vec3 :: new ( scale * direction * time . seconds_since_startup ( ) . sin ( ) as f32 / 20. , 0. , time . seconds_since_startup ( ) . cos ( ) as f32 / 20. , ) ; direction *= - 1. ; scale += 0.5 ; } }
This system will move all entities with component `EntityInMyScene`, so all
entities from the second scene
This system will move all entities with component ` EntityInMyScene ` so all entities from the second scene
time
Res<Time>
scene_entities
Query<&mut Transform, With<EntityInMyScene>>
time
Res<Time>
scene_entities
Query<&mut Transform, With<EntityInMyScene>>