Install & Compatibility
Where this runs
No compatibility data collected yet for this library.
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
entityx/entityx.h
✓ #include <entityx/entityx.h>
Create an entity with a Position component
#include <entityx/entityx.h>
#include <iostream>
struct Position : entityx::Component<Position> {
float x, y;
Position(float x = 0, float y = 0) : x(x), y(y) {}
};
int main() {
entityx::EntityX ex;
entityx::Entity entity = ex.entities.create();
entity.assign<Position>(1.0f, 2.0f);
auto pos = entity.component<Position>();
if (pos) {
std::cout << pos->x << ", " << pos->y << std::endl;
}
return 0;
}
Debug
Known issues
No known issues recorded.
Audit
Dependencies
No dependency data recorded yet.
Resources
No resource links recorded.