summary refs log tree commit diff stats
path: root/src/systems/controlling.h
blob: 1f1e8a05253b181688fc53d5617ede14867d4966 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#ifndef CONTROLLING_H_80B1BB8D
#define CONTROLLING_H_80B1BB8D

#include "system.h"
#include <queue>
#include "entity_manager.h"

class ControllingSystem : public System {
public:

  ControllingSystem(Game& game) : System(game)
  {
  }

  void tick(double dt);
  void input(int key, int action);

private:

  void walkLeft(id_type entity);
  void walkRight(id_type entity);
  void stopWalking(id_type entity);
  void jump(id_type entity);
  void stopJumping(id_type entity);
  void drop(id_type entity, bool start);

  std::queue<std::pair<int,int>> actions_;
};

#endif /* end of include guard: CONTROLLING_H_80B1BB8D */