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
9
struct
RailgunScopeWidget
:
HudWidget
10
{
11
RailgunScopeWidget
();
12
void
update
(
float
dt,
const
HudGameState
& state,
HudTweenPool
& tweens)
override
;
13
void
draw
(
HudContext
& ctx,
float
drawX,
float
drawY)
override
;
14
15
private
:
16
float
screenW_
= 1280.f;
17
float
screenH_
= 720.f;
18
float
chargeTime_
= 0.f;
19
};
HudWidget.hpp
Base struct for all HUD widgets.
HudContext
Accumulates HUD geometry during a frame for batch rendering.
Definition
HudContext.hpp:19
HudTweenPool
Fixed-size tween pool. No heap allocations.
Definition
HudTween.hpp:35
HudGameState
Snapshot of game state consumed by the HUD each frame.
Definition
HudTypes.hpp:367
HudWidget
Base class for a retained HUD element.
Definition
HudWidget.hpp:16
RailgunScopeWidget::draw
void draw(HudContext &ctx, float drawX, float drawY) override
Emit geometry into the draw context.
Definition
RailgunScopeWidget.cpp:78
RailgunScopeWidget::screenW_
float screenW_
Definition
RailgunScopeWidget.hpp:16
RailgunScopeWidget::screenH_
float screenH_
Definition
RailgunScopeWidget.hpp:17
RailgunScopeWidget::chargeTime_
float chargeTime_
Definition
RailgunScopeWidget.hpp:18
RailgunScopeWidget::update
void update(float dt, const HudGameState &state, HudTweenPool &tweens) override
Called each frame before draw(). Update animation, consume events.
Definition
RailgunScopeWidget.cpp:70
RailgunScopeWidget::RailgunScopeWidget
RailgunScopeWidget()
Definition
RailgunScopeWidget.cpp:64
src
client
hud
widgets
RailgunScopeWidget.hpp
Generated by
1.16.1