diff options
Diffstat (limited to 'src/systems/pondering.cpp')
-rw-r--r-- | src/systems/pondering.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/systems/pondering.cpp b/src/systems/pondering.cpp index 50a8bc8..e40db1d 100644 --- a/src/systems/pondering.cpp +++ b/src/systems/pondering.cpp | |||
@@ -5,12 +5,14 @@ | |||
5 | 5 | ||
6 | void PonderingSystem::tick(double dt) | 6 | void PonderingSystem::tick(double dt) |
7 | { | 7 | { |
8 | auto entities = game.getEntityManager().getEntitiesWithComponents<PonderableComponent, TransformableComponent>(); | 8 | auto entities = game_.getEntityManager().getEntitiesWithComponents< |
9 | PonderableComponent, | ||
10 | TransformableComponent>(); | ||
9 | 11 | ||
10 | for (auto entity : entities) | 12 | for (id_type entity : entities) |
11 | { | 13 | { |
12 | auto& transformable = game.getEntityManager().getComponent<TransformableComponent>(entity); | 14 | auto& transformable = game_.getEntityManager().getComponent<TransformableComponent>(entity); |
13 | auto& ponderable = game.getEntityManager().getComponent<PonderableComponent>(entity); | 15 | auto& ponderable = game_.getEntityManager().getComponent<PonderableComponent>(entity); |
14 | 16 | ||
15 | // Accelerate | 17 | // Accelerate |
16 | ponderable.setVelocityX(ponderable.getVelocityX() + ponderable.getAccelX() * dt); | 18 | ponderable.setVelocityX(ponderable.getVelocityX() + ponderable.getAccelX() * dt); |