Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed ECS example compilation issues #3083

Closed
wants to merge 2 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions crates/bevy_ecs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ The built in "parallel stage" considers dependencies between systems and (by def
Bevy ECS should feel very natural for those familiar with Rust syntax:

```rust
use bevy_ecs::prelude::*;
use bevy::prelude::*;
crener marked this conversation as resolved.
Show resolved Hide resolved
crener marked this conversation as resolved.
Show resolved Hide resolved

struct Velocity {
x: f32,
Expand All @@ -109,7 +109,7 @@ struct Position {
}

// This system moves each entity with a Position and Velocity component
fn movement(query: Query<(&mut Position, &Velocity)>) {
fn movement(mut query: Query<(&mut Position, &Velocity)>) {
for (mut position, velocity) in query.iter_mut() {
position.x += velocity.x;
position.y += velocity.y;
Expand All @@ -131,7 +131,7 @@ fn main() {
// Add a Stage to our schedule. Each Stage in a schedule runs all of its systems
// before moving on to the next Stage
schedule.add_stage("update", SystemStage::parallel()
.with_system(movement)
.with_system(movement.system())
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With 0.6 (#2398) the usage of .system() is now optional and all examples should no longer contain it.
This change should be reverted.

);

// Run the schedule once. If your app has a "loop", you would run this once per loop
Expand Down