Bomberman Multiplayer
Authoritative multiplayer networking layer for Bomberman.
Loading...
Searching...
No Matches
bomberman::ConnectScene Class Reference

Pre-game multiplayer connect scene. More...

#include <ConnectScene.h>

Inheritance diagram for bomberman::ConnectScene:
[legend]

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
Gamegame = nullptr
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ ConnectScene()

bomberman::ConnectScene::ConnectScene ( Game game,
uint16_t  port 
)

Constructs the connect scene UI scaffold.

Parameters
gameOwning game runtime.
portServer port displayed as read-only info (not user-editable).

Member Function Documentation

◆ onEnter()

void bomberman::ConnectScene::onEnter ( )
overridevirtual

Enables SDL text input while the connect form is active.

Reimplemented from bomberman::Scene.

◆ onEvent()

void bomberman::ConnectScene::onEvent ( const SDL_Event &  event)
overridevirtual

Handles field editing, connect submission, and local leave/cancel input.

Reimplemented from bomberman::Scene.

◆ onExit()

void bomberman::ConnectScene::onExit ( )
overridevirtual

Disables SDL text input when leaving the connect form.

Reimplemented from bomberman::Scene.

◆ update()

void bomberman::ConnectScene::update ( unsigned int  delta)
overridevirtual

Polls NetClient connection state and updates status/scene flow.

Reimplemented from bomberman::Scene.


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