Skip to content

Commit

Permalink
update README
Browse files Browse the repository at this point in the history
  • Loading branch information
Ubpa committed Jan 23, 2021
1 parent 2cd7b23 commit ae27608
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,21 +42,21 @@ struct Position { float val; };
struct Velocity { float val; };

struct MoverSystem {
static void OnUpdate(Schedule& schedule) {
schedule.RegisterEntityJob(
[](const Velocity* v, Position* p) {
p->val += v->val;
},
"Mover"
);
}
static void OnUpdate(Schedule& schedule) {
schedule.RegisterEntityJob(
[](const Velocity* v, Position* p) {
p->val += v->val;
},
"Mover"
);
}
};

int main() {
World w;
w.systemMngr.RegisterAndActivate<MoverSystem>();
w.entityMngr.Create<Position, Velocity>();
w.Update();
World w;
w.systemMngr.RegisterAndActivate<MoverSystem>();
w.entityMngr.Create<Position, Velocity>();
w.Update();
}
```
Expand Down

0 comments on commit ae27608

Please sign in to comment.