group2 0.1.0
CSE 125 Group 2
Loading...
Searching...
No Matches
GravityIndicator.hpp
Go to the documentation of this file.
1
6
7#pragma once
8
9#include "hud/HudWidget.hpp"
10
12{
13 float diskSize = 56.f;
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 int direction_ = 0; // 0=down, 1=left, 2=up, 3=right
21};
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
GravityIndicator()
Definition GravityIndicator.cpp:13
void draw(HudContext &ctx, float drawX, float drawY) override
Emit geometry into the draw context.
Definition GravityIndicator.cpp:25
float diskSize
Definition GravityIndicator.hpp:13
int direction_
Definition GravityIndicator.hpp:20
void update(float dt, const HudGameState &state, HudTweenPool &tweens) override
Called each frame before draw(). Update animation, consume events.
Definition GravityIndicator.cpp:20
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