group2 0.1.0
CSE 125 Group 2
Loading...
Searching...
No Matches
DamageAccumWidget.hpp
Go to the documentation of this file.
1
3
4#pragma once
5
6#include "hud/HudWidget.hpp"
7
13{
15 void update(float dt, const HudGameState& state, HudTweenPool& tweens) override;
16 void draw(HudContext& ctx, float drawX, float drawY) override;
17
18private:
20 float alpha_ = 0.f;
21 HudColor color_{1.f, 1.f, 1.f, 1.f};
22};
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
HudColor color_
Matches latest hit type.
Definition DamageAccumWidget.hpp:21
float alpha_
Definition DamageAccumWidget.hpp:20
void update(float dt, const HudGameState &state, HudTweenPool &tweens) override
Called each frame before draw(). Update animation, consume events.
Definition DamageAccumWidget.cpp:16
int displayTotal_
Definition DamageAccumWidget.hpp:19
DamageAccumWidget()
Definition DamageAccumWidget.cpp:9
void draw(HudContext &ctx, float drawX, float drawY) override
Emit geometry into the draw context.
Definition DamageAccumWidget.cpp:36
RGBA color for HUD elements (linear space, straight alpha).
Definition HudTypes.hpp:15
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