summary refs log tree commit diff stats
path: root/src/systems/controlling.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/controlling.cpp
parenta855ce0262e17b85e8670c511acf179ebddd24fe (diff)
downloadtherapy-da3df061699203eccc9a0c98becaee3ce8050a4f.tar.gz
therapy-da3df061699203eccc9a0c98becaee3ce8050a4f.tar.bz2
therapy-da3df061699203eccc9a0c98becaee3ce8050a4f.zip
Whitespace changes
Diffstat (limited to 'src/systems/controlling.cpp')
-rw-r--r--src/systems/controlling.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/systems/controlling.cpp b/src/systems/controlling.cpp index b1e73ad..456da3b 100644 --- a/src/systems/controlling.cpp +++ b/src/systems/controlling.cpp
@@ -14,12 +14,12 @@ void ControllingSystem::tick(double dt)
14 { 14 {
15 int key = actions.front().first; 15 int key = actions.front().first;
16 int action = actions.front().second; 16 int action = actions.front().second;
17 17
18 auto entities = game.getEntityManager().getEntitiesWithComponents<ControllableComponent, PonderableComponent, AnimatableComponent, DroppableComponent>(); 18 auto entities = game.getEntityManager().getEntitiesWithComponents<ControllableComponent, PonderableComponent, AnimatableComponent, DroppableComponent>();
19 for (auto entity : entities) 19 for (auto entity : entities)
20 { 20 {
21 auto& controllable = game.getEntityManager().getComponent<ControllableComponent>(entity); 21 auto& controllable = game.getEntityManager().getComponent<ControllableComponent>(entity);
22 22
23 if (action == GLFW_PRESS) 23 if (action == GLFW_PRESS)
24 { 24 {
25 if (key == controllable.getLeftKey()) 25 if (key == controllable.getLeftKey())
@@ -33,7 +33,7 @@ void ControllingSystem::tick(double dt)
33 } else if (key == controllable.getRightKey()) 33 } else if (key == controllable.getRightKey())
34 { 34 {
35 controllable.setHoldingRight(true); 35 controllable.setHoldingRight(true);
36 36
37 if (!controllable.isFrozen()) 37 if (!controllable.isFrozen())
38 { 38 {
39 walkRight(entity); 39 walkRight(entity);
@@ -56,7 +56,7 @@ void ControllingSystem::tick(double dt)
56 if (key == controllable.getLeftKey()) 56 if (key == controllable.getLeftKey())
57 { 57 {
58 controllable.setHoldingLeft(false); 58 controllable.setHoldingLeft(false);
59 59
60 if (!controllable.isFrozen()) 60 if (!controllable.isFrozen())
61 { 61 {
62 if (controllable.isHoldingRight()) 62 if (controllable.isHoldingRight())
@@ -69,7 +69,7 @@ void ControllingSystem::tick(double dt)
69 } else if (key == controllable.getRightKey()) 69 } else if (key == controllable.getRightKey())
70 { 70 {
71 controllable.setHoldingRight(false); 71 controllable.setHoldingRight(false);
72 72
73 if (!controllable.isFrozen()) 73 if (!controllable.isFrozen())
74 { 74 {
75 if (controllable.isHoldingRight()) 75 if (controllable.isHoldingRight())
@@ -94,7 +94,7 @@ void ControllingSystem::tick(double dt)
94 } 94 }
95 } 95 }
96 } 96 }
97 97
98 actions.pop(); 98 actions.pop();
99 } 99 }
100} 100}