summary refs log tree commit diff stats
path: root/src/systems/controlling.h
blob: 30210b3b0a5b058dcef3640ede19f13902809d38 (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
#ifndef CONTROLLING_H_80B1BB8D
#define CONTROLLING_H_80B1BB8D

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

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

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

  private:
    void walkLeft(int entity);
    void walkRight(int entity);
    void stopWalking(int entity);
    void jump(int entity);
    void stopJumping(int entity);
    void drop(int entity, bool start);

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

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