summary refs log tree commit diff stats
path: root/src/systems/controlling.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/systems/controlling.h')
-rw-r--r--src/systems/controlling.h36
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
7class ControllingSystem : public System { 8class ControllingSystem : public System {
8 public: 9public:
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); 18private:
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 */