r-type  0.0.0
R-Type main
Loading...
Searching...
No Matches
Client.hpp
Go to the documentation of this file.
1///
2/// @file Client.hpp
3/// @brief This file contains the Client class declaration
4/// @namespace cli
5///
6
7#pragma once
8
9#include <unordered_map>
10
12#include "Engine/Engine.hpp"
16
17namespace cli
18{
19
20 ///
21 /// @class Client
22 /// @brief Class for the client
23 /// @namespace cli
24 ///
25 class Client
26 {
27
28 public:
29 explicit Client(const ArgsConfig &cfg);
30 ~Client() = default;
31
32 Client(const Client &) = delete;
33 Client &operator=(const Client &) = delete;
34 Client(Client &&) = delete;
35 Client &operator=(Client &&) = delete;
36
37 void run();
38 void stop() const;
39
40 private:
41 void handleEvents(eng::Event &event);
42 void updateKeyboardInput(ecs::Registry &registry);
44 void setupScenes();
45
46 std::unique_ptr<utl::PluginLoader> m_pluginLoader;
47 std::unique_ptr<eng::Engine> m_engine;
48 std::shared_ptr<gme::IGameClient> m_gameSolo;
49 std::shared_ptr<gme::IGameClient> m_gameMulti;
50 std::unordered_map<eng::Key, bool> m_keysPressed;
51
53 bool m_showDebug = false;
54 }; // class Client
55} // namespace cli
This file contains the app config structure for client.
This file contains the Engine class declaration.
This file contains the Game interface.
Modern, cross-platform plugin loader.
Class for the client.
Definition Client.hpp:26
utl::cli::AppConfig m_config
Definition Client.hpp:52
std::unordered_map< eng::Key, bool > m_keysPressed
Definition Client.hpp:50
std::shared_ptr< gme::IGameClient > m_gameSolo
Definition Client.hpp:48
std::shared_ptr< gme::IGameClient > m_gameMulti
Definition Client.hpp:49
bool m_showDebug
Definition Client.hpp:53
std::unique_ptr< utl::PluginLoader > m_pluginLoader
Definition Client.hpp:46
std::unique_ptr< eng::Engine > m_engine
Definition Client.hpp:47
Client(const ArgsConfig &cfg)
Definition client.cpp:31
void setupScenes()
Definition client.cpp:90
Client(Client &&)=delete
Client(const Client &)=delete
Client & operator=(Client &&)=delete
void stop() const
Definition client.cpp:84
void run()
Definition client.cpp:69
static utl::cli::AppConfig setupConfig(const ArgsConfig &cfg)
Definition client.cpp:11
Client & operator=(const Client &)=delete
void handleEvents(eng::Event &event)
Definition event.cpp:4
void updateKeyboardInput(ecs::Registry &registry)
Definition event.cpp:38
~Client()=default
Class for managing entities and their components.
Definition Registry.hpp:25
This file contains the ArgsHandler class declaration.