diff --git a/examples/simple.rs b/examples/simple.rs index 8b55c5c86d..00c51d0fac 100644 --- a/examples/simple.rs +++ b/examples/simple.rs @@ -1,5 +1,5 @@ use bevy::*; -use bevy::{render::*, asset::{Asset, AssetStorage, Handle}, math, Schedulable}; +use bevy::{render::*, asset::{Asset, AssetStorage, Handle}, math, Schedulable, Parent}; use rand::{rngs::StdRng, Rng, SeedableRng, random}; fn build_wander_system() -> Box { @@ -13,7 +13,10 @@ fn build_wander_system() -> Box { Write, Write, )>::query()) - .build(move |_, world, time , person_query| { + .build(move | + _, world, + time , + person_query| { for (_, translation, mut wander, mut navigation_point) in person_query.iter(world) { wander.elapsed += time.delta_seconds; if wander.elapsed >= wander.duration { @@ -39,7 +42,9 @@ fn build_navigate_system() -> Box { Write, Write, )>::query()) - .build(move |_, world, _, person_query| { + .build(move | + _, world, + _, person_query| { for (_, translation, mut velocity, navigation_point) in person_query.iter(world) { let distance = navigation_point.target - translation.vector; if math::length(&distance) > 0.01 { @@ -109,6 +114,21 @@ fn build_spawner_system(world: &mut World) -> Box { }) } +fn build_light_rotator_system() -> Box { + SystemBuilder::new("LightRotator") + .read_resource::