|
R-Type 0.1
|
Round in progress: simulates the stage and returns to the lobby when every player left. More...
#include <Scene/serverGameScene.hpp>
Public Member Functions | |
| ServerGameScene (ServerDependency &dep) | |
| Creates the scene. | |
| void | onEnter (rtk::EngineContext &context) |
| Builds the stage and sends every entity to the players. | |
| std::optional< ServerSceneType > | onUpdate (rtk::EngineContext &context, const ServerInput &input, float dt) |
| Processes network events, advances the tick and sends a snapshot every 3 ticks. | |
| void | onExit (rtk::EngineContext &context) |
| Destroys every entity and resets the game state. | |
Static Public Attributes | |
| static constexpr ServerSceneType | Type = ServerSceneType::InGame |
| Identifier of this scene. | |
Round in progress: simulates the stage and returns to the lobby when every player left.
| rtype::server::ServerGameScene::ServerGameScene | ( | ServerDependency & | dep | ) |
Creates the scene.
| dep | Game that owns the scene. |
| void rtype::server::ServerGameScene::onEnter | ( | rtk::EngineContext & | context | ) |
Builds the stage and sends every entity to the players.
| context | Engine services. |
| std::optional< ServerSceneType > rtype::server::ServerGameScene::onUpdate | ( | rtk::EngineContext & | context, |
| const ServerInput & | input, | ||
| float | dt ) |
Processes network events, advances the tick and sends a snapshot every 3 ticks.
| context | Engine services. |
| input | Unused. |
| dt | Elapsed time since the last frame, in seconds. |
| void rtype::server::ServerGameScene::onExit | ( | rtk::EngineContext & | context | ) |
Destroys every entity and resets the game state.
| context | Engine services. |