-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsystem_input_multi.h
48 lines (40 loc) · 1014 Bytes
/
system_input_multi.h
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#ifndef SYSTEM_INPUT_MULTI_H
#define SYSTEM_INPUT_MULTI_H
#include "component_motion.h"
#include "component_sprite.h"
#include "system.h"
class SystemInputMulti : public System
{
public:
SystemInputMulti() : System(), initialized(false),pressed_spacebar(false), pressed_esc(false), pressed_a(false), pressed_d(false), pressed_w(false), pressed_left(false), pressed_right(false), pressed_up(false)
{
};
virtual ~SystemInputMulti()
{
};
virtual void Update();
protected:
virtual Type GetType()
{
return System::TYPE_INPUT_MULTI;
};
private:
bool Initialize();
bool initialized;
bool pressed_p;
bool pressed_spacebar;
bool pressed_esc;
bool pressed_a;
bool pressed_d;
bool pressed_w;
bool pressed_left;
bool pressed_right;
bool pressed_up;
ComponentMotion* cmot_player_1;
ComponentMotion* cmot_player_2;
ComponentSprite* cspr_player_1;
ComponentSprite* cspr_player_2;
ComponentSprite* cspr_ball;
ComponentMotion* cmot_ball;
};
#endif