group2 0.1.0
CSE 125 Group 2
Loading...
Searching...
No Matches
HitMarkerWidget.hpp
Go to the documentation of this file.
1
3
4#pragma once
5
6#include "hud/HudWidget.hpp"
7
9{
10 float armLength = 12.f;
11 float armThickness = 2.5f;
12 float armGap = 5.f;
13 float fadeDuration = 0.35f;
14
16 void update(float dt, const HudGameState& state, HudTweenPool& tweens) override;
17 void draw(HudContext& ctx, float drawX, float drawY) override;
18
19private:
20 float alpha_ = 0.f;
21 float scale_ = 1.f;
22 bool isHeadshot_ = false;
23 bool shieldBreak_ = false;
24};
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
void update(float dt, const HudGameState &state, HudTweenPool &tweens) override
Called each frame before draw(). Update animation, consume events.
Definition HitMarkerWidget.cpp:13
float alpha_
Definition HitMarkerWidget.hpp:20
float armGap
Definition HitMarkerWidget.hpp:12
void draw(HudContext &ctx, float drawX, float drawY) override
Emit geometry into the draw context.
Definition HitMarkerWidget.cpp:25
float scale_
Definition HitMarkerWidget.hpp:21
float fadeDuration
Definition HitMarkerWidget.hpp:13
float armLength
Definition HitMarkerWidget.hpp:10
HitMarkerWidget()
Definition HitMarkerWidget.cpp:7
float armThickness
Definition HitMarkerWidget.hpp:11
bool shieldBreak_
Definition HitMarkerWidget.hpp:23
bool isHeadshot_
Definition HitMarkerWidget.hpp:22
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