Skip to content
This repository has been archived by the owner on Oct 25, 2021. It is now read-only.

Commit

Permalink
wander system now depends on ricochet system
Browse files Browse the repository at this point in the history
unnecessary commented code removed
  • Loading branch information
orhanbalci committed Jun 6, 2019
1 parent a0ef902 commit 7c1f379
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/states/main_game.rs
Original file line number Diff line number Diff line change
Expand Up @@ -94,20 +94,21 @@ impl MainGameState {
"avoid_obstacle_system",
&["closest_obstacle_system"],
)
.with(behaviors::ricochet::RicochetSystem, "ricochet_system", &[])
.with(
behaviors::wander::WanderSystem,
"wander_system",
&[
"seek_prey_system",
"avoid_predator_system",
"avoid_obstacle_system",
"ricochet_system",
],
)
.with(behaviors::ricochet::RicochetSystem, "ricochet_system", &[])
.with(
movement::MovementSystem,
"movement_system",
&["wander_system", "ricochet_system"],
&["wander_system"],
)
.with(
collision::CollisionSystem,
Expand Down Expand Up @@ -279,11 +280,11 @@ impl<'a> State<GameData<'a, 'a>, CustomStateEvent> for MainGameState {
let x = rng.gen_range(left, right);
let y = rng.gen_range(bottom, top);
let scale = rng.gen_range(0.8f32, 1.2f32);
//let rotation = rng.gen_range(0.0f32, PI);

let mut transform = Transform::default();
transform.set_xyz(x, y, 0.0);
transform.set_scale(scale, scale, 1.0);
//transform.set_rotation_euler(0.0, 0.0, rotation);

let nushi_entity = data.world.create_entity().with(transform).build();
let mut spawn_events = data
.world
Expand Down

0 comments on commit 7c1f379

Please sign in to comment.