diff options
author | Ekaitz Zarraga <ekaitz@elenq.tech> | 2021-12-24 19:53:16 +0100 |
---|---|---|
committer | Ekaitz Zarraga <ekaitz@elenq.tech> | 2021-12-24 19:53:16 +0100 |
commit | 9a9a0e090190dc7a2dba833d1d4efa8417283edc (patch) | |
tree | 4ba43ee254a1362e8400d4a78f6fcaa5c6f3b12b /src/command.cpp | |
parent | 4eee72704bd85db58981636109fdb456eb78a3c1 (diff) |
Overall cleaning and restructuring using commands
Diffstat (limited to 'src/command.cpp')
-rw-r--r-- | src/command.cpp | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/src/command.cpp b/src/command.cpp new file mode 100644 index 0000000..ab134e9 --- /dev/null +++ b/src/command.cpp @@ -0,0 +1,27 @@ +#include "command.h" +#include "game.h" + +Command::~Command(){} + +Nop::~Nop(){} +void Nop::execute( GameState &game ){ +} + +// Window commands +WindowClose::~WindowClose(){} +void WindowClose::execute( GameState &game ){ + game.close(); +} + +WindowFocus::~WindowFocus(){} +void WindowFocus::execute( GameState &game ){ + game.resume(); +} + +WindowUnFocus::~WindowUnFocus(){} +void WindowUnFocus::execute( GameState &game ){ + game.pause(); +} + +// Keyboard commands + |