|
|
Bomberman Multiplayer
Authoritative multiplayer networking layer for Bomberman.
|
Pre-game multiplayer connect scene. More...
#include <ConnectScene.h>
Public Member Functions | |
| ConnectScene (Game *game, uint16_t port) | |
| Constructs the connect scene UI scaffold. | |
| void | onEnter () override |
| Enables SDL text input while the connect form is active. | |
| void | onExit () override |
| Disables SDL text input when leaving the connect form. | |
| void | onEvent (const SDL_Event &event) override |
| Handles field editing, connect submission, and local leave/cancel input. | |
| void | update (unsigned int delta) override |
Polls NetClient connection state and updates status/scene flow. | |
Public Member Functions inherited from bomberman::Scene | |
| Scene (Game *game) | |
| Construct a new Scene object. | |
| virtual | ~Scene () |
| Destroy the Scene object. | |
| void | addObject (std::shared_ptr< Object > object) |
| Add object to scene for drawing. | |
| void | insertObject (std::shared_ptr< Object > object, int position) |
| Add object to scene for drawing to specific position. | |
| void | removeObject (std::shared_ptr< Object > object) |
| Remove object from scene. | |
| void | setCamera (const int x, const int y) |
| Set the Camera object to specific position. | |
| void | draw () const |
| Draw objects on the screen. | |
| SDL_Rect | getCamera () const |
| Returns the current camera position. | |
| virtual bool | wantsNetworkInputPolling () const |
| Returns true when this scene wants Game to poll and send multiplayer input every sim tick. | |
| virtual void | onNetInputQueued (uint32_t inputSeq, uint8_t buttons) |
| Called after Game samples and queues a local input for multiplayer scenes. | |
Additional Inherited Members | |
Protected Attributes inherited from bomberman::Scene | |
| Game * | game = nullptr |
Pre-game multiplayer connect scene.
Owns the user-facing form for player name and server host/address entry, displays async connection progress/failure status from NetClient, and transitions into the multiplayer lobby flow once the session is ready.
| bomberman::ConnectScene::ConnectScene | ( | Game * | game, |
| uint16_t | port | ||
| ) |
Constructs the connect scene UI scaffold.
| game | Owning game runtime. |
| port | Server port displayed as read-only info (not user-editable). |
|
overridevirtual |
Enables SDL text input while the connect form is active.
Reimplemented from bomberman::Scene.
|
overridevirtual |
Handles field editing, connect submission, and local leave/cancel input.
Reimplemented from bomberman::Scene.
|
overridevirtual |
Disables SDL text input when leaving the connect form.
Reimplemented from bomberman::Scene.
|
overridevirtual |
Polls NetClient connection state and updates status/scene flow.
Reimplemented from bomberman::Scene.