summary refs log tree commit diff stats
path: root/src/systems/pondering.cpp
diff options
context:
space:
mode:
authorKelly Rauchenberger <fefferburbia@gmail.com>2018-02-05 11:51:24 -0500
committerKelly Rauchenberger <fefferburbia@gmail.com>2018-02-05 11:51:24 -0500
commitda3df061699203eccc9a0c98becaee3ce8050a4f (patch)
treee5082da630d73abc1ecc0b0367d420fbf245126c /src/systems/pondering.cpp
parenta855ce0262e17b85e8670c511acf179ebddd24fe (diff)
downloadtherapy-da3df061699203eccc9a0c98becaee3ce8050a4f.tar.gz
therapy-da3df061699203eccc9a0c98becaee3ce8050a4f.tar.bz2
therapy-da3df061699203eccc9a0c98becaee3ce8050a4f.zip
Whitespace changes
Diffstat (limited to 'src/systems/pondering.cpp')
-rw-r--r--src/systems/pondering.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/systems/pondering.cpp b/src/systems/pondering.cpp index 96775d0..50a8bc8 100644 --- a/src/systems/pondering.cpp +++ b/src/systems/pondering.cpp
@@ -6,16 +6,16 @@
6void PonderingSystem::tick(double dt) 6void PonderingSystem::tick(double dt)
7{ 7{
8 auto entities = game.getEntityManager().getEntitiesWithComponents<PonderableComponent, TransformableComponent>(); 8 auto entities = game.getEntityManager().getEntitiesWithComponents<PonderableComponent, TransformableComponent>();
9 9
10 for (auto entity : entities) 10 for (auto entity : entities)
11 { 11 {
12 auto& transformable = game.getEntityManager().getComponent<TransformableComponent>(entity); 12 auto& transformable = game.getEntityManager().getComponent<TransformableComponent>(entity);
13 auto& ponderable = game.getEntityManager().getComponent<PonderableComponent>(entity); 13 auto& ponderable = game.getEntityManager().getComponent<PonderableComponent>(entity);
14 14
15 // Accelerate 15 // Accelerate
16 ponderable.setVelocityX(ponderable.getVelocityX() + ponderable.getAccelX() * dt); 16 ponderable.setVelocityX(ponderable.getVelocityX() + ponderable.getAccelX() * dt);
17 ponderable.setVelocityY(ponderable.getVelocityY() + ponderable.getAccelY() * dt); 17 ponderable.setVelocityY(ponderable.getVelocityY() + ponderable.getAccelY() * dt);
18 18
19 // Move 19 // Move
20 transformable.setX(transformable.getX() + ponderable.getVelocityX() * dt); 20 transformable.setX(transformable.getX() + ponderable.getVelocityX() * dt);
21 transformable.setY(transformable.getY() + ponderable.getVelocityY() * dt); 21 transformable.setY(transformable.getY() + ponderable.getVelocityY() * dt);