From 306878eed7aef509088423cdd4b859e425b34e38 Mon Sep 17 00:00:00 2001 From: Alec Thomas Date: Mon, 9 Feb 2015 11:57:23 +1100 Subject: Update README+example for inheritance-free change. --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'README.md') diff --git a/README.md b/README.md index bfbdfc1..ac9c14c 100644 --- a/README.md +++ b/README.md @@ -116,13 +116,13 @@ To that end Components are typically [POD types](http://en.wikipedia.org/wiki/Pl As an example, position and direction information might be represented as: ```c++ -struct Position : entityx::Component { +struct Position { Position(float x = 0.0f, float y = 0.0f) : x(x), y(y) {} float x, y; }; -struct Direction : entityx::Component { +struct Direction { Direction(float x = 0.0f, float y = 0.0f) : x(x), y(y) {} float x, y; @@ -208,7 +208,7 @@ As an example, we might want to implement a very basic collision system using ou First, we define the event type, which for our example is simply the two entities that collided: ```c++ -struct Collision : public Event { +struct Collision { Collision(entityx::Entity left, entityx::Entity right) : left(left), right(right) {} entityx::Entity left, right; -- cgit v1.2.3