diff --git a/Cargo.toml b/Cargo.toml index eb8e53b035..48a24c66d1 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -13,4 +13,5 @@ winit = "0.20.0-alpha4" glsl-to-spirv = "0.1" zerocopy = "0.2" log = "0.4" -env_logger = "0.7" \ No newline at end of file +env_logger = "0.7" +rand = "0.7.2" \ No newline at end of file diff --git a/examples/simple.rs b/examples/simple.rs index b95ebe4643..3d2a1adc62 100644 --- a/examples/simple.rs +++ b/examples/simple.rs @@ -1,28 +1,149 @@ use bevy::*; -use bevy::{render::*, asset::{Asset, AssetStorage}, math}; +use bevy::{render::*, asset::{Asset, AssetStorage, Handle}, math, Schedulable}; +use rand::{rngs::StdRng, Rng, SeedableRng, random}; -// fn build_move_system() -> Box { -// SystemBuilder::new("MoveSystem") -// .with_query(<>) -// } +fn build_wander_system(world: &mut World) -> Box { + let mut rng = StdRng::from_entropy(); + + SystemBuilder::new("Wander") + .read_resource::