MCPcopy Create free account
hub / github.com/alecthomas/entityx / update

Method update

entityx/System_test.cc:45–55  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

43 explicit MovementSystem(string label = "") : label(label) {}
44
45 void update(EntityManager &es, EventManager &events, TimeDelta) override {
46 EntityManager::View entities =
47 es.entities_with_components<Position, Direction>();
48 ComponentHandle<Position> position;
49 ComponentHandle<Direction> direction;
50 for (auto entity : entities) {
51 entity.unpack<Position, Direction>(position, direction);
52 position->x += direction->x;
53 position->y += direction->y;
54 }
55 }
56
57 string label;
58};

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected