r-type  0.0.0
R-Type main
Loading...
Searching...
No Matches
gme::ConfigFlappy Class Referencefinal

ConfigFlappy scene. More...

#include <ConfigFlappy.hpp>

+ Inheritance diagram for gme::ConfigFlappy:
+ Collaboration diagram for gme::ConfigFlappy:

Public Member Functions

 ConfigFlappy (eng::id assignedId, const std::shared_ptr< eng::IRenderer > &renderer)
 
 ~ConfigFlappy () override=default
 
 ConfigFlappy (const ConfigFlappy &other)=delete
 
ConfigFlappyoperator= (const ConfigFlappy &other)=delete
 
 ConfigFlappy (ConfigFlappy &&other)=delete
 
ConfigFlappyoperator= (const ConfigFlappy &&other)=delete
 
void update (float dt, const eng::WindowSize &size) override
 
void event (const eng::Event &event) override
 
bool & playMusic ()
 
- Public Member Functions inherited from eng::AScene
 AScene (const id assignedId)
 
 ~AScene () override=default
 
 AScene (const AScene &other)=delete
 
 AScene (AScene &&other)=delete
 
ASceneoperator= (const AScene &other)=delete
 
ASceneoperator= (AScene &&other)=delete
 
std::string & getName () override
 
id getId () const override
 
ecs::RegistrygetRegistry () override
 
void setName (const std::string &newName) override
 
void addSystem (std::unique_ptr< ecs::ISystem > system) override
 
void updateSystems (const float dt) override
 
- Public Member Functions inherited from eng::IScene
virtual ~IScene ()=default
 

Public Attributes

std::function< void(const std::string &option, const std::string &playerName, int skinIndex)> onOptionSelected
 

Private Member Functions

char keyToChar (eng::Key key) const
 
std::string & getCurrentEditField ()
 
void updateValueDisplay ()
 

Private Attributes

std::unordered_map< eng::Key, bool > m_keysPressed
 
ecs::Entity m_fpsEntity
 
ecs::Entity m_titleEntity
 
ecs::Entity m_playerNameValueEntity
 
ecs::Entity m_skinValueEntity
 
ecs::Entity m_skinSpriteEntity
 
const std::vector< std::string > m_menuOptions = {"Player Name", "Skin", "Start Game", "Go back to menu"}
 
int m_selectedIndex = 0
 
float m_animationTime = 0.0f
 
float m_titlePulseTime = 0.0f
 
bool m_playMusic = false
 
std::string m_playerName = "Player"
 
int m_skinIndex = 0
 
const std::shared_ptr< eng::IRenderer > & m_renderer
 

Additional Inherited Members

- Protected Attributes inherited from eng::AScene
utl::EventBusm_eventBus = utl::EventBus::getInstance()
 
std::uint32_t m_eventComponentId = 0
 

Detailed Description

ConfigFlappy scene.

Definition at line 20 of file ConfigFlappy.hpp.

Constructor & Destructor Documentation

◆ ConfigFlappy() [1/3]

◆ ~ConfigFlappy()

gme::ConfigFlappy::~ConfigFlappy ( )
overridedefault

◆ ConfigFlappy() [2/3]

gme::ConfigFlappy::ConfigFlappy ( const ConfigFlappy & other)
delete

◆ ConfigFlappy() [3/3]

gme::ConfigFlappy::ConfigFlappy ( ConfigFlappy && other)
delete

Member Function Documentation

◆ event()

void gme::ConfigFlappy::event ( const eng::Event & event)
overridevirtual

Implements eng::IScene.

Definition at line 284 of file configFlappy.cpp.

References eng::Delete, eng::Down, eng::Enter, eng::Event::key, eng::KeyPressed, eng::KeyReleased, keyToChar(), eng::Left, eng::Right, eng::Space, eng::Event::type, and eng::Up.

+ Here is the call graph for this function:

◆ getCurrentEditField()

std::string & gme::ConfigFlappy::getCurrentEditField ( )
private

Definition at line 91 of file configFlappy.cpp.

◆ keyToChar()

◆ operator=() [1/2]

ConfigFlappy & gme::ConfigFlappy::operator= ( const ConfigFlappy && other)
delete

◆ operator=() [2/2]

ConfigFlappy & gme::ConfigFlappy::operator= ( const ConfigFlappy & other)
delete

◆ playMusic()

bool & gme::ConfigFlappy::playMusic ( )
inline

Definition at line 33 of file ConfigFlappy.hpp.

References m_playMusic.

◆ update()

void gme::ConfigFlappy::update ( float dt,
const eng::WindowSize & size )
overridevirtual

◆ updateValueDisplay()

void gme::ConfigFlappy::updateValueDisplay ( )
private

Definition at line 96 of file configFlappy.cpp.

Referenced by ConfigFlappy().

+ Here is the caller graph for this function:

Member Data Documentation

◆ m_animationTime

float gme::ConfigFlappy::m_animationTime = 0.0f
private

Definition at line 51 of file ConfigFlappy.hpp.

◆ m_fpsEntity

ecs::Entity gme::ConfigFlappy::m_fpsEntity
private

Definition at line 43 of file ConfigFlappy.hpp.

◆ m_keysPressed

std::unordered_map<eng::Key, bool> gme::ConfigFlappy::m_keysPressed
private

Definition at line 42 of file ConfigFlappy.hpp.

◆ m_menuOptions

const std::vector<std::string> gme::ConfigFlappy::m_menuOptions = {"Player Name", "Skin", "Start Game", "Go back to menu"}
private

Definition at line 48 of file ConfigFlappy.hpp.

Referenced by ConfigFlappy().

◆ m_playerName

std::string gme::ConfigFlappy::m_playerName = "Player"
private

Definition at line 54 of file ConfigFlappy.hpp.

Referenced by ConfigFlappy().

◆ m_playerNameValueEntity

ecs::Entity gme::ConfigFlappy::m_playerNameValueEntity
private

Definition at line 45 of file ConfigFlappy.hpp.

Referenced by ConfigFlappy().

◆ m_playMusic

bool gme::ConfigFlappy::m_playMusic = false
private

Definition at line 53 of file ConfigFlappy.hpp.

Referenced by playMusic().

◆ m_renderer

const std::shared_ptr<eng::IRenderer>& gme::ConfigFlappy::m_renderer
private

Definition at line 56 of file ConfigFlappy.hpp.

◆ m_selectedIndex

int gme::ConfigFlappy::m_selectedIndex = 0
private

Definition at line 50 of file ConfigFlappy.hpp.

Referenced by ConfigFlappy().

◆ m_skinIndex

int gme::ConfigFlappy::m_skinIndex = 0
private

Definition at line 55 of file ConfigFlappy.hpp.

Referenced by ConfigFlappy().

◆ m_skinSpriteEntity

ecs::Entity gme::ConfigFlappy::m_skinSpriteEntity
private

Definition at line 47 of file ConfigFlappy.hpp.

Referenced by ConfigFlappy().

◆ m_skinValueEntity

ecs::Entity gme::ConfigFlappy::m_skinValueEntity
private

Definition at line 46 of file ConfigFlappy.hpp.

Referenced by ConfigFlappy().

◆ m_titleEntity

ecs::Entity gme::ConfigFlappy::m_titleEntity
private

Definition at line 44 of file ConfigFlappy.hpp.

Referenced by ConfigFlappy().

◆ m_titlePulseTime

float gme::ConfigFlappy::m_titlePulseTime = 0.0f
private

Definition at line 52 of file ConfigFlappy.hpp.

◆ onOptionSelected

std::function<void(const std::string &option, const std::string &playerName, int skinIndex)> gme::ConfigFlappy::onOptionSelected

Definition at line 35 of file ConfigFlappy.hpp.


The documentation for this class was generated from the following files: