summary refs log tree commit diff stats
path: root/src/systems/controlling.h
blob: 61f86ebfc5294b4846e052e5621d12ee5c68eb1e (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 */