Skip to content

Commit

Permalink
Update hello_world.rs
Browse files Browse the repository at this point in the history
  • Loading branch information
Indra-db committed Mar 4, 2024
1 parent 1785590 commit 31f2562
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion flecs_ecs/examples/hello_world.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ fn main() {
// Register system
let _sys = world
.system_builder::<(Position, Velocity)>()
.on_each_entity(|_entity, (pos, vel)| {
// .on_each_entity if you want the entity to be added in the parameter list
.on_each(|(pos, vel)| {
pos.x += vel.x;
pos.y += vel.y;
});
Expand Down

0 comments on commit 31f2562

Please sign in to comment.