-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
Fix bevy_ecs README.md #3279
Fix bevy_ecs README.md #3279
Conversation
@@ -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()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.system()
is not required on main
.
@@ -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)>) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is correct; good catch.
@@ -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()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No longer needed on main
, see #2398
Yup adding |
Ah, I see, and as I'm using bevy_ecs 0.5, the patch from june is not live yet, gotcha. Will amend to just show the mut then. |
Indeed, although that fix is already in #2575 |
@DJMcNab indeed, closing it then. |
Objective
Solution
system()
needs to be called.