group2 0.1.0
CSE 125 Group 2
Loading...
Searching...
No Matches
KdaCounter.hpp
Go to the documentation of this file.
1
10
11#pragma once
12
13#include "hud/HudWidget.hpp"
14
16{
17 float kFontSize = 22.f;
18 float adFontSize = 16.f;
19 float labelFontSize = 8.f;
20 float panelPadX = 12.f;
21 float panelPadY = 6.f;
22 float colGap = 14.f;
23
24 KdaCounter();
25 void update(float dt, const HudGameState& state, HudTweenPool& tweens) override;
26 void draw(HudContext& ctx, float drawX, float drawY) override;
27
28private:
29 int kills_ = 0;
30 int assists_ = 0;
31 int deaths_ = 0;
32};
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:192
Base class for a retained HUD element.
Definition HudWidget.hpp:16
float labelFontSize
Definition KdaCounter.hpp:19
float panelPadX
Definition KdaCounter.hpp:20
float adFontSize
Definition KdaCounter.hpp:18
float panelPadY
Definition KdaCounter.hpp:21
float kFontSize
Definition KdaCounter.hpp:17
KdaCounter()
Definition KdaCounter.cpp:11
void draw(HudContext &ctx, float drawX, float drawY) override
Emit geometry into the draw context.
Definition KdaCounter.cpp:26
float colGap
Definition KdaCounter.hpp:22
int assists_
Definition KdaCounter.hpp:30
int deaths_
Definition KdaCounter.hpp:31
void update(float dt, const HudGameState &state, HudTweenPool &tweens) override
Called each frame before draw(). Update animation, consume events.
Definition KdaCounter.cpp:18
int kills_
Definition KdaCounter.hpp:29