Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Ubpa committed Jul 30, 2020
1 parent aef787a commit 3d379c4
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,13 @@
```c++
#include <UECS/World.h>

using namespace Ubpa::UECS;

struct Position { float val; };
struct Velocity { float val; };

struct MoverSystem {
static void OnUpdate(Ubpa::Schedule& schedule) {
static void OnUpdate(Schedule& schedule) {
schedule.Request(
[](const Velocity* v, Position* p) {
p->val += v->val;
Expand All @@ -35,7 +37,7 @@ struct MoverSystem {
};

int main() {
Ubpa::World w;
World w;
w.systemMngr.Register<MoverSystem>();
w.entityMngr.CreateEntity<Position, Velocity>();
w.Update();
Expand Down

0 comments on commit 3d379c4

Please sign in to comment.