MpHUD class
#include <Jazz2/UI/Multiplayer/MpHUD.h>
Player HUD for multiplayer.
Multiplayer-specific extension of HUD. It overrides the overview and score drawing to show multiplayer information such as the player's position in the current round, and adds a centered countdown display.
Base classes
- class Jazz2::UI::HUD
- Player HUD.
Constructors, destructors, conversion operators
-
MpHUD(Jazz2::
Multiplayer:: MpLevelHandler* levelHandler) - Creates a new instance.
Public functions
- void OnUpdate(float timeMult) override
- Called every frame to update the node state.
- auto OnDraw(RenderQueue& renderQueue) -> bool override
- Called when the node needs to be drawn, returning
trueif a command was added. -
void ShowCountdown(std::
int32_t secsLeft) - Shows countdown text in the middle of the screen.
Protected functions
-
void OnDrawOverview(const Rectf& view,
const Rectf& adjustedView,
Actors::
Player* player) override - Called when some overview information of the player needs to be drawn.
-
void OnDrawScore(const Rectf& view,
Actors::
Player* player) override - Called when score of the player needs to be drawn.
-
void DrawPositionInRound(const Rectf& view,
Actors::
Player* player) - Draws the position of the player in the current round.