group2 0.1.0
CSE 125 Group 2
Loading...
Searching...
No Matches
RoundTimer.hpp
Go to the documentation of this file.
1
2#pragma once
3
4#include "hud/HudWidget.hpp"
5
7{
8 float fontSize = 30.f;
9 float lowTimeThreshold = 10.f;
10
11 RoundTimer();
12 void update(float dt, const HudGameState& state, HudTweenPool& tweens) override;
13 void draw(HudContext& ctx, float drawX, float drawY) override;
14
15private:
16 float timeRemaining_ = 0.f;
17};
Base struct for all HUD widgets.
Accumulates HUD geometry during a frame for batch rendering.
Definition HudContext.hpp:18
Fixed-size tween pool. No heap allocations.
Definition HudTween.hpp:35
Snapshot of game state consumed by the HUD each frame.
Definition HudTypes.hpp:148
Base class for a retained HUD element.
Definition HudWidget.hpp:16
void draw(HudContext &ctx, float drawX, float drawY) override
Emit geometry into the draw context.
Definition RoundTimer.cpp:20
float timeRemaining_
Definition RoundTimer.hpp:16
float fontSize
Definition RoundTimer.hpp:8
float lowTimeThreshold
Seconds — color shifts to red below this.
Definition RoundTimer.hpp:9
void update(float dt, const HudGameState &state, HudTweenPool &tweens) override
Called each frame before draw(). Update animation, consume events.
Definition RoundTimer.cpp:15
RoundTimer()
Definition RoundTimer.cpp:8