diff options
author | Kelly Rauchenberger <fefferburbia@gmail.com> | 2018-02-08 12:34:42 -0500 |
---|---|---|
committer | Kelly Rauchenberger <fefferburbia@gmail.com> | 2018-02-08 12:34:42 -0500 |
commit | cefe66cdbb8786dc455657376e36f0ff8785d5bc (patch) | |
tree | 7e90536fad90f2954b3834dc4959f402883c32b3 /src/systems/controlling.h | |
parent | cec0ed92c4035c4421d3cc2448f5423fcbb7f7d4 (diff) | |
download | therapy-cefe66cdbb8786dc455657376e36f0ff8785d5bc.tar.gz therapy-cefe66cdbb8786dc455657376e36f0ff8785d5bc.tar.bz2 therapy-cefe66cdbb8786dc455657376e36f0ff8785d5bc.zip |
Introduced animated sprites
Also restyled a lot of the code.
Diffstat (limited to 'src/systems/controlling.h')
-rw-r--r-- | src/systems/controlling.h | 36 |
1 files changed, 20 insertions, 16 deletions
diff --git a/src/systems/controlling.h b/src/systems/controlling.h index 30210b3..1f1e8a0 100644 --- a/src/systems/controlling.h +++ b/src/systems/controlling.h | |||
@@ -3,24 +3,28 @@ | |||
3 | 3 | ||
4 | #include "system.h" | 4 | #include "system.h" |
5 | #include <queue> | 5 | #include <queue> |
6 | #include "entity_manager.h" | ||
6 | 7 | ||
7 | class ControllingSystem : public System { | 8 | class ControllingSystem : public System { |
8 | public: | 9 | public: |
9 | ControllingSystem(Game& game) | 10 | |
10 | : System(game) {} | 11 | ControllingSystem(Game& game) : System(game) |
11 | 12 | { | |
12 | void tick(double dt); | 13 | } |
13 | void input(int key, int action); | 14 | |
14 | 15 | void tick(double dt); | |
15 | private: | 16 | void input(int key, int action); |
16 | void walkLeft(int entity); | 17 | |
17 | void walkRight(int entity); | 18 | private: |
18 | void stopWalking(int entity); | 19 | |
19 | void jump(int entity); | 20 | void walkLeft(id_type entity); |
20 | void stopJumping(int entity); | 21 | void walkRight(id_type entity); |
21 | void drop(int entity, bool start); | 22 | void stopWalking(id_type entity); |
22 | 23 | void jump(id_type entity); | |
23 | std::queue<std::pair<int,int>> actions; | 24 | void stopJumping(id_type entity); |
25 | void drop(id_type entity, bool start); | ||
26 | |||
27 | std::queue<std::pair<int,int>> actions_; | ||
24 | }; | 28 | }; |
25 | 29 | ||
26 | #endif /* end of include guard: CONTROLLING_H_80B1BB8D */ | 30 | #endif /* end of include guard: CONTROLLING_H_80B1BB8D */ |