blob: a40e786f18a845b35bcda6ba17452107967afdfd (
plain)
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
|
#ifndef COMMAND_H
#define COMMAND_H
#include "game.h"
class Command{
public:
virtual ~Command();
virtual void execute( GameState &state ) =0;
};
class Nop: public Command {
~Nop();
void execute( GameState &state ) override;
};
// Window commands
class WindowClose: public Command {
~WindowClose();
void execute( GameState &state ) override;
};
class WindowFocus: public Command {
~WindowFocus();
void execute( GameState &state ) override;
};
class WindowUnFocus: public Command {
~WindowUnFocus();
void execute( GameState &state ) override;
};
// Keyboard commands
class KeyboardDownReleased: public Command {
~KeyboardDownReleased();
void execute( GameState &state ) override;
};
class KeyboardDownPressed: public Command {
~KeyboardDownPressed();
void execute( GameState &state ) override;
};
#endif
|