Class for the client. More...
#include <Client.hpp>
Collaboration diagram for cli::Client:Public Member Functions | |
| Client (const ArgsConfig &cfg) | |
| ~Client ()=default | |
| Client (const Client &)=delete | |
| Client & | operator= (const Client &)=delete |
| Client (Client &&)=delete | |
| Client & | operator= (Client &&)=delete |
| void | run () |
| void | stop () const |
Private Member Functions | |
| void | handleEvents (eng::Event &event) |
| void | updateKeyboardInput (ecs::Registry ®istry) |
| void | setupScenes () |
Static Private Member Functions | |
| static utl::cli::AppConfig | setupConfig (const ArgsConfig &cfg) |
Private Attributes | |
| std::unique_ptr< utl::PluginLoader > | m_pluginLoader |
| std::unique_ptr< eng::Engine > | m_engine |
| std::shared_ptr< gme::IGameClient > | m_gameSolo |
| std::shared_ptr< gme::IGameClient > | m_gameMulti |
| std::unordered_map< eng::Key, bool > | m_keysPressed |
| utl::cli::AppConfig | m_config |
| bool | m_showDebug = false |
Class for the client.
Definition at line 25 of file Client.hpp.
|
explicit |
Definition at line 31 of file client.cpp.
References cli::ArgsConfig::audio_lib_path, BUILD_TYPE, cli::ArgsConfig::game_multi_lib_path, cli::ArgsConfig::game_solo_lib_path, GIT_COMMIT_HASH, GIT_TAG, utl::Path::Texture::ICON_PATH, utl::INFO, utl::Logger::log(), cli::ArgsConfig::network_lib_path, utl::Path::Plugin::PLUGIN_AUDIO_SFML, utl::Path::Plugin::PLUGIN_GAME_MULTI, utl::Path::Plugin::PLUGIN_GAME_SOLO, utl::Path::Plugin::PLUGIN_NETWORK_ASIO_CLIENT, utl::Path::Plugin::PLUGIN_RENDERER_SFML, PROJECT_NAME, PROJECT_VERSION, and cli::ArgsConfig::renderer_lib_path.
Here is the call graph for this function:
|
default |
|
delete |
|
delete |
|
private |
Definition at line 4 of file event.cpp.
References eng::Closed, eng::Engine::getRenderer(), eng::Engine::getSceneManager(), eng::Event::key, eng::KeyPressed, eng::KeyReleased, eng::LControl, m_engine, m_keysPressed, m_showDebug, eng::Engine::setState(), eng::STOP, eng::Event::type, and updateKeyboardInput().
Here is the call graph for this function:| void cli::Client::run | ( | ) |
Definition at line 69 of file client.cpp.
References utl::Config::Color::DARK, and eng::RUN.
Referenced by main().
Here is the caller graph for this function:
|
staticprivate |
Definition at line 11 of file client.cpp.
References utl::cli::AppConfig::audioVolume, utl::cli::AppConfig::controlScheme, utl::Config::Audio::DEFAULT_AUDIO_VOLUME, utl::Config::Game::DEFAULT_CONTROL_SCHEME, utl::Config::Game::DEFAULT_SKIN_INDEX, utl::Config::Game::DEFAULT_VIDEO_QUALITY, cli::ArgsConfig::frameLimit, utl::cli::AppConfig::frameLimit, cli::ArgsConfig::fullscreen, utl::cli::AppConfig::fullscreen, cli::ArgsConfig::height, utl::cli::AppConfig::height, cli::ArgsConfig::host, utl::cli::AppConfig::host, cli::ArgsConfig::player_name, utl::cli::AppConfig::player_name, cli::ArgsConfig::port, utl::cli::AppConfig::port, utl::cli::AppConfig::skinIndex, utl::cli::AppConfig::videoQuality, cli::ArgsConfig::width, and utl::cli::AppConfig::width.
|
private |
Definition at line 90 of file client.cpp.
| void cli::Client::stop | ( | ) | const |
Definition at line 84 of file client.cpp.
Referenced by main().
Here is the caller graph for this function:
|
private |
Definition at line 38 of file event.cpp.
References ecs::Registry::createEntity(), eng::Down, ecs::Registry::getAll(), ecs::Registry::getComponent(), eng::Left, eng::Right, eng::Space, eng::Up, and ecs::Registry::EntityBuilder::with().
Referenced by handleEvents().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Definition at line 52 of file Client.hpp.
|
private |
Definition at line 47 of file Client.hpp.
Referenced by handleEvents().
|
private |
Definition at line 49 of file Client.hpp.
|
private |
Definition at line 48 of file Client.hpp.
|
private |
Definition at line 50 of file Client.hpp.
Referenced by handleEvents().
|
private |
Definition at line 46 of file Client.hpp.
|
private |
Definition at line 53 of file Client.hpp.
Referenced by handleEvents().