group2 0.1.0
CSE 125 Group 2
Loading...
Searching...
No Matches
RailgunScopeWidget.hpp
Go to the documentation of this file.
1
3
4#pragma once
5
6#include "hud/HudWidget.hpp"
7
10{
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 screenW_ = 1280.f;
17 float screenH_ = 720.f;
18 float chargeTime_ = 0.f;
19};
Base struct for all HUD widgets.
Accumulates HUD geometry during a frame for batch rendering.
Definition HudContext.hpp:19
Fixed-size tween pool. No heap allocations.
Definition HudTween.hpp:35
Snapshot of game state consumed by the HUD each frame.
Definition HudTypes.hpp:367
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 RailgunScopeWidget.cpp:78
float screenW_
Definition RailgunScopeWidget.hpp:16
float screenH_
Definition RailgunScopeWidget.hpp:17
float chargeTime_
Definition RailgunScopeWidget.hpp:18
void update(float dt, const HudGameState &state, HudTweenPool &tweens) override
Called each frame before draw(). Update animation, consume events.
Definition RailgunScopeWidget.cpp:70
RailgunScopeWidget()
Definition RailgunScopeWidget.cpp:64