]> code.bitgloo.com Git - clyne/entityx.git/commitdiff
Revert change made regarding component inheritance
authorZack Mulgrew <zmulgrew@linkedin.com>
Sat, 6 Feb 2016 04:14:39 +0000 (20:14 -0800)
committerZack Mulgrew <zmulgrew@linkedin.com>
Sat, 6 Feb 2016 04:14:39 +0000 (20:14 -0800)
README.md
entityx/help/Pool_test.cc

index 43d195c0b67f3b16a2fe23e4eea4c513c4319629..db124ceb4d0b98e3c5c156247ecbb62025265005 100644 (file)
--- 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;
index 08ef1d2c3b54ea7c9a1facf34aebe7b61989b4a9..1092068f4644c008ce9fb9d7efdaa886e092d4c5 100644 (file)
@@ -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)++;
   }