r-type  0.0.0
R-Type main
Loading...
Searching...
No Matches
ConfigMulti.hpp
Go to the documentation of this file.
1///
2/// @file ConfigMulti.hpp
3/// @brief This file contains the multiplayer configuration scene
4/// @namespace eng
5///
6
7#pragma once
8
9#include <unordered_map>
10
12#include "Interfaces/IAudio.hpp"
13
14namespace cli
15{
16 ///
17 /// @class ConfigMulti
18 /// @brief ConfigMulti scene
19 /// @namespace cli
20 ///
21 class ConfigMulti final : public eng::AScene
22 {
23 public:
24 ConfigMulti(const std::shared_ptr<eng::IRenderer> &renderer, const std::shared_ptr<eng::IAudio> &audio);
25 ~ConfigMulti() override = default;
26
27 ConfigMulti(const ConfigMulti &other) = delete;
28 ConfigMulti &operator=(const ConfigMulti &other) = delete;
29 ConfigMulti(ConfigMulti &&other) = delete;
30 ConfigMulti &operator=(ConfigMulti &&other) = delete;
31
32 void update(float dt, const eng::WindowSize &size) override;
33 void event(const eng::Event &event) override;
34
35 std::function<void(const std::string &option)> onOptionSelected;
36
37 private:
38 std::unordered_map<eng::Key, bool> m_keysPressed;
40 const std::vector<std::string> m_menuOptions = {"Create room", "Join room", "Go back to menu"};
41 const std::shared_ptr<eng::IAudio> &m_audio;
42
44 }; // class ConfigMulti
45} // namespace cli
This file contains the Audio interface.
ConfigMulti scene.
ConfigMulti(ConfigMulti &&other)=delete
ConfigMulti & operator=(const ConfigMulti &other)=delete
ConfigMulti(const ConfigMulti &other)=delete
const std::vector< std::string > m_menuOptions
std::unordered_map< eng::Key, bool > m_keysPressed
ecs::Entity m_fpsEntity
void update(float dt, const eng::WindowSize &size) override
const std::shared_ptr< eng::IAudio > & m_audio
ConfigMulti & operator=(ConfigMulti &&other)=delete
ConfigMulti(const std::shared_ptr< eng::IRenderer > &renderer, const std::shared_ptr< eng::IAudio > &audio)
void event(const eng::Event &event) override
~ConfigMulti() override=default
std::function< void(const std::string &option)> onOptionSelected
Class for scene.
Definition IScene.hpp:46
This file contains the IScene class.
std::uint32_t Entity
Definition Entity.hpp:13