From 9a9a0e090190dc7a2dba833d1d4efa8417283edc Mon Sep 17 00:00:00 2001 From: Ekaitz Zarraga Date: Fri, 24 Dec 2021 19:53:16 +0100 Subject: Overall cleaning and restructuring using commands --- src/command.cpp | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 src/command.cpp (limited to 'src/command.cpp') 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 + -- cgit v1.2.3