r-type  0.0.0
R-Type main
Loading...
Searching...
No Matches
ConfigSolo.hpp
Go to the documentation of this file.
1///
2/// @file ConfigSolo.hpp
3/// @brief This file contains the solo configuration scene
4/// @namespace gme
5///
6
7#pragma once
8
9#include <unordered_map>
10
12
13namespace gme
14{
15 ///
16 /// @class ConfigSolo
17 /// @brief ConfigSolo scene
18 /// @namespace gme
19 ///
20 class ConfigSolo final : public eng::AScene
21 {
22 public:
23 ConfigSolo(eng::id assignedId, const std::shared_ptr<eng::IRenderer> &renderer);
24 ~ConfigSolo() override = default;
25
26 ConfigSolo(const ConfigSolo &other) = delete;
27 ConfigSolo &operator=(const ConfigSolo &other) = delete;
28 ConfigSolo(ConfigSolo &&other) = delete;
29 ConfigSolo &operator=(ConfigSolo &&other) = delete;
30
31 void update(float dt, const eng::WindowSize &size) override;
32 void event(const eng::Event &event) override;
33 bool &playMusic() { return m_playMusic; }
34
35 std::function<void(const std::string &option)> onOptionSelected;
36
37 private:
38 std::unordered_map<eng::Key, bool> m_keysPressed;
41 const std::vector<std::string> m_menuOptions = {"Level easy", "Level medium", "Go back to menu"};
42
44 float m_animationTime = 0.0f;
45 float m_titlePulseTime = 0.0f;
46 bool m_playMusic = false;
47 }; // class ConfigSolo
48} // namespace gme
Abstract class for scene.
Definition IScene.hpp:52
ConfigSolo scene.
ConfigSolo(const ConfigSolo &other)=delete
std::function< void(const std::string &option)> onOptionSelected
ConfigSolo & operator=(ConfigSolo &&other)=delete
void update(float dt, const eng::WindowSize &size) override
~ConfigSolo() override=default
ConfigSolo(eng::id assignedId, const std::shared_ptr< eng::IRenderer > &renderer)
Definition configSolo.cpp:7
ConfigSolo(ConfigSolo &&other)=delete
bool & playMusic()
ecs::Entity m_fpsEntity
void event(const eng::Event &event) override
ConfigSolo & operator=(const ConfigSolo &other)=delete
std::unordered_map< eng::Key, bool > m_keysPressed
ecs::Entity m_titleEntity
const std::vector< std::string > m_menuOptions
This file contains the IScene class.
std::uint32_t Entity
Definition Entity.hpp:13
unsigned int id
Definition IScene.hpp:20