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
12
struct
DamageAccumWidget
:
HudWidget
13
{
14
DamageAccumWidget
();
15
void
update
(
float
dt,
const
HudGameState
& state,
HudTweenPool
& tweens)
override
;
16
void
draw
(
HudContext
& ctx,
float
drawX,
float
drawY)
override
;
17
18
private
:
19
int
displayTotal_
= 0;
20
float
alpha_
= 0.f;
21
HudColor
color_
{1.f, 1.f, 1.f, 1.f};
22
};
HudWidget.hpp
Base struct for all HUD widgets.
HudContext
Accumulates HUD geometry during a frame for batch rendering.
Definition
HudContext.hpp:18
HudTweenPool
Fixed-size tween pool. No heap allocations.
Definition
HudTween.hpp:35
DamageAccumWidget::color_
HudColor color_
Matches latest hit type.
Definition
DamageAccumWidget.hpp:21
DamageAccumWidget::alpha_
float alpha_
Definition
DamageAccumWidget.hpp:20
DamageAccumWidget::update
void update(float dt, const HudGameState &state, HudTweenPool &tweens) override
Called each frame before draw(). Update animation, consume events.
Definition
DamageAccumWidget.cpp:16
DamageAccumWidget::displayTotal_
int displayTotal_
Definition
DamageAccumWidget.hpp:19
DamageAccumWidget::DamageAccumWidget
DamageAccumWidget()
Definition
DamageAccumWidget.cpp:9
DamageAccumWidget::draw
void draw(HudContext &ctx, float drawX, float drawY) override
Emit geometry into the draw context.
Definition
DamageAccumWidget.cpp:36
HudColor
RGBA color for HUD elements (linear space, straight alpha).
Definition
HudTypes.hpp:15
HudGameState
Snapshot of game state consumed by the HUD each frame.
Definition
HudTypes.hpp:148
HudWidget
Base class for a retained HUD element.
Definition
HudWidget.hpp:16
src
client
hud
widgets
DamageAccumWidget.hpp
Generated by
1.16.1