From 683e22c419757744ce853c35d732f607ddb9af16 Mon Sep 17 00:00:00 2001 From: Kelly Rauchenberger Date: Wed, 3 Feb 2021 12:33:03 -0500 Subject: Added input system --- src/game.h | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) (limited to 'src/game.h') diff --git a/src/game.h b/src/game.h index f8e4b0d..36398bc 100644 --- a/src/game.h +++ b/src/game.h @@ -10,17 +10,17 @@ #include "map.h" #include "consts.h" #include "system.h" - -struct Input { - bool left = false; - bool right = false; - bool up = false; - bool down = false; -}; +#include "mixer.h" class Game { public: + Mixer& getMixer() { return mixer_; } + + bool shouldQuit() const { return shouldQuit_; } + + void quit() { shouldQuit_ = true; } + template void emplaceSystem() { systems_.push_back(std::make_unique(*this)); @@ -70,6 +70,9 @@ public: private: + Mixer mixer_; + bool shouldQuit_ = false; + std::list> systems_; std::map systemByKey_; -- cgit 1.4.1