From cefe66cdbb8786dc455657376e36f0ff8785d5bc Mon Sep 17 00:00:00 2001 From: Kelly Rauchenberger Date: Thu, 8 Feb 2018 12:34:42 -0500 Subject: Introduced animated sprites Also restyled a lot of the code. --- src/systems/pondering.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src/systems/pondering.cpp') 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 @@ void PonderingSystem::tick(double dt) { - auto entities = game.getEntityManager().getEntitiesWithComponents(); + auto entities = game_.getEntityManager().getEntitiesWithComponents< + PonderableComponent, + TransformableComponent>(); - for (auto entity : entities) + for (id_type entity : entities) { - auto& transformable = game.getEntityManager().getComponent(entity); - auto& ponderable = game.getEntityManager().getComponent(entity); + auto& transformable = game_.getEntityManager().getComponent(entity); + auto& ponderable = game_.getEntityManager().getComponent(entity); // Accelerate ponderable.setVelocityX(ponderable.getVelocityX() + ponderable.getAccelX() * dt); -- cgit 1.4.1