diff options
author | HampusM <hampus@hampusmat.com> | 2022-02-28 21:30:30 +0100 |
---|---|---|
committer | HampusM <hampus@hampusmat.com> | 2022-06-13 17:56:54 +0200 |
commit | ede689d23e57c9b701ab19aa9112a0b2368865c9 (patch) | |
tree | e8c7afc7b2e5caf43b1b0c52356c0596021f25cb /src/game/game.hpp | |
parent | f0883534b3303cf2b74f3ab51efe16615d2561a9 (diff) |
feat: add input handler & quitting with 'q'
Diffstat (limited to 'src/game/game.hpp')
-rw-r--r-- | src/game/game.hpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/game/game.hpp b/src/game/game.hpp index e7d91d6..bc37c91 100644 --- a/src/game/game.hpp +++ b/src/game/game.hpp @@ -2,17 +2,20 @@ #include "DI/auto_wirable.hpp" #include "interfaces/game.hpp" +#include "interfaces/input.hpp" #include "interfaces/scene.hpp" #include <memory> -class Game : public IGame, public AutoWirable<IGame, Game, IScene> +class Game : public IGame, public AutoWirable<IGame, Game, IScene, IInputHandler> { public: - explicit Game(std::shared_ptr<IScene> scene); + explicit Game(std::shared_ptr<IScene> scene, + std::shared_ptr<IInputHandler> input_handler); void run() override; private: std::shared_ptr<IScene> _scene; + std::shared_ptr<IInputHandler> _input_handler; }; |