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;
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;
#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)++;
}