|
Air-Trap 1.0.0
A multiplayer R-Type clone game engine built with C++23 and ECS architecture
|
#include <GameOverScene.hpp>
Public Types | |
| using | ChangeStateFn = std::function< void(GameState)> |
Public Member Functions | |
| GameOverScene (ecs::Registry &UiRegistry, Settings &settings, TranslationManager &translationManager, NetworkSyncSystem &network, graphics::UiFactory &uiFactory, std::function< void(GameState)> changeState) | |
| void | onEnter (void) override |
| Called when the scene is entered. | |
| void | onExit (void) override |
| Called when the scene is exited. | |
| void | handleEvent (const sf::Event &event) override |
| Handle an incoming event. | |
| void | update (float dt) override |
| Update the scene state. | |
Public Member Functions inherited from rtp::client::interfaces::IScene | |
| virtual | ~IScene (void)=default |
Private Attributes | |
| ecs::Registry & | _uiRegistry |
| Settings & | _settings |
| TranslationManager & | _translationManager |
| NetworkSyncSystem & | _network |
| graphics::UiFactory & | _uiFactory |
| ChangeStateFn | _changeState |
Definition at line 23 of file GameOverScene.hpp.
| using rtp::client::scenes::GameOverScene::ChangeStateFn = std::function<void(GameState)> |
Definition at line 33 of file GameOverScene.hpp.
| rtp::client::scenes::GameOverScene::GameOverScene | ( | ecs::Registry & | UiRegistry, |
| Settings & | settings, | ||
| TranslationManager & | translationManager, | ||
| NetworkSyncSystem & | network, | ||
| graphics::UiFactory & | uiFactory, | ||
| std::function< void(GameState)> | changeState | ||
| ) |
Definition at line 13 of file GameOverScene.cpp.
|
overridevirtual |
Handle an incoming event.
| event | The event to handle. |
Implements rtp::client::interfaces::IScene.
Definition at line 82 of file GameOverScene.cpp.
References _changeState, _network, rtp::client::Menu, and rtp::client::NetworkSyncSystem::tryLeaveRoom().
|
overridevirtual |
Called when the scene is entered.
Implements rtp::client::interfaces::IScene.
Definition at line 28 of file GameOverScene.cpp.
References _changeState, _network, _uiFactory, _uiRegistry, rtp::client::NetworkSyncSystem::GameOverSummary::bestPlayer, rtp::client::graphics::UiFactory::createButton(), rtp::client::graphics::UiFactory::createText(), rtp::client::NetworkSyncSystem::getGameOverSummary(), rtp::log::info(), rtp::client::Menu, and rtp::client::NetworkSyncSystem::tryLeaveRoom().
|
overridevirtual |
Called when the scene is exited.
Implements rtp::client::interfaces::IScene.
Definition at line 77 of file GameOverScene.cpp.
References rtp::log::info().
|
overridevirtual |
Update the scene state.
| dt | Time delta since the last update. |
Implements rtp::client::interfaces::IScene.
Definition at line 93 of file GameOverScene.cpp.
|
private |
Definition at line 46 of file GameOverScene.hpp.
Referenced by handleEvent(), and onEnter().
|
private |
Definition at line 44 of file GameOverScene.hpp.
Referenced by handleEvent(), and onEnter().
|
private |
Definition at line 42 of file GameOverScene.hpp.
|
private |
Definition at line 43 of file GameOverScene.hpp.
|
private |
Definition at line 45 of file GameOverScene.hpp.
Referenced by onEnter().
|
private |
Definition at line 41 of file GameOverScene.hpp.
Referenced by onEnter().