group2 0.1.0
CSE 125 Group 2
Loading...
Searching...
No Matches
DamageIndicator Struct Reference

#include <DamageIndicator.hpp>

Inheritance diagram for DamageIndicator:
[legend]
Collaboration diagram for DamageIndicator:
[legend]

Classes

struct  Arc

Public Member Functions

 DamageIndicator ()
void update (float dt, const HudGameState &state, HudTweenPool &tweens) override
 Called each frame before draw(). Update animation, consume events.
void draw (HudContext &ctx, float drawX, float drawY) override
 Emit geometry into the draw context.
Public Member Functions inherited from HudWidget
virtual ~HudWidget ()=default

Public Attributes

float arcDistance = 80.f
 Distance from center.
float arcLength = 32.f
 Arc segment length.
float arcThickness = 6.f
float fadeTime = 0.8f
Public Attributes inherited from HudWidget
bool visible = true
HudAnchor anchor = HudAnchor::TopLeft
float offsetX = 0.f
float offsetY = 0.f
float width = 0.f
float height = 0.f
float uiScale_ = 1.f
 Set by Hud each frame (screenH / 1080).

Private Attributes

std::vector< Arcarcs_

Constructor & Destructor Documentation

◆ DamageIndicator()

DamageIndicator::DamageIndicator ( )

Member Function Documentation

◆ draw()

void DamageIndicator::draw ( HudContext & ctx,
float drawX,
float drawY )
overridevirtual

Emit geometry into the draw context.

Parameters
ctxImmediate-mode draw API.
drawXResolved pixel X (anchor + offset already applied).
drawYResolved pixel Y.

Implements HudWidget.

Here is the call graph for this function:

◆ update()

void DamageIndicator::update ( float dt,
const HudGameState & state,
HudTweenPool & tweens )
overridevirtual

Called each frame before draw(). Update animation, consume events.

Implements HudWidget.

Member Data Documentation

◆ arcDistance

float DamageIndicator::arcDistance = 80.f

Distance from center.

◆ arcLength

float DamageIndicator::arcLength = 32.f

Arc segment length.

◆ arcs_

std::vector<Arc> DamageIndicator::arcs_
private

◆ arcThickness

float DamageIndicator::arcThickness = 6.f

◆ fadeTime

float DamageIndicator::fadeTime = 0.8f

The documentation for this struct was generated from the following files: