aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZack Mulgrew <zmulgrew@linkedin.com>2016-02-05 20:14:39 -0800
committerZack Mulgrew <zmulgrew@linkedin.com>2016-02-05 20:14:39 -0800
commit4f67e896183c5d4f6ac32661d20ab715e5f6dbc8 (patch)
treeb00a9c59ae3e4d45afd830d43c1981cf6a33ce8a
parentf176609c242afd53f6083b3e115227ace10e2eb2 (diff)
Revert change made regarding component inheritance
-rw-r--r--README.md6
-rw-r--r--entityx/help/Pool_test.cc2
2 files changed, 4 insertions, 4 deletions
diff --git a/README.md b/README.md
index 43d195c..db124ce 100644
--- a/README.md
+++ b/README.md
@@ -119,13 +119,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 : public entityx::Component<Position> {
+struct Position {
Position(float x = 0.0f, float y = 0.0f) : x(x), y(y) {}
float x, y;
};
-struct Direction : public entityx::Component<Direction> {
+struct Direction {
Direction(float x = 0.0f, float y = 0.0f) : x(x), y(y) {}
float x, y;
@@ -224,7 +224,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 entityx::Component<Collision> {
+struct Collision {
Collision(entityx::Entity left, entityx::Entity right) : left(left), right(right) {}
entityx::Entity left, right;
diff --git a/entityx/help/Pool_test.cc b/entityx/help/Pool_test.cc
index 08ef1d2..1092068 100644
--- a/entityx/help/Pool_test.cc
+++ b/entityx/help/Pool_test.cc
@@ -15,7 +15,7 @@
#include "entityx/help/Pool.h"
#include "entityx/Entity.h"
-struct Position : public entityx::Component<Position> {
+struct Position {
explicit Position(int *ptr = nullptr) : ptr(ptr) {
if (ptr) (*ptr)++;
}