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

#include <KdaCounter.hpp>

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

Public Member Functions

 KdaCounter ()
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 kFontSize = 22.f
float adFontSize = 16.f
float labelFontSize = 8.f
float panelPadX = 12.f
float panelPadY = 6.f
float colGap = 14.f
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

int kills_ = 0
int assists_ = 0
int deaths_ = 0

Constructor & Destructor Documentation

◆ KdaCounter()

KdaCounter::KdaCounter ( )

Member Function Documentation

◆ draw()

void KdaCounter::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 KdaCounter::update ( float dt,
const HudGameState & state,
HudTweenPool & tweens )
overridevirtual

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

Implements HudWidget.

Member Data Documentation

◆ adFontSize

float KdaCounter::adFontSize = 16.f

◆ assists_

int KdaCounter::assists_ = 0
private

◆ colGap

float KdaCounter::colGap = 14.f

◆ deaths_

int KdaCounter::deaths_ = 0
private

◆ kFontSize

float KdaCounter::kFontSize = 22.f

◆ kills_

int KdaCounter::kills_ = 0
private

◆ labelFontSize

float KdaCounter::labelFontSize = 8.f

◆ panelPadX

float KdaCounter::panelPadX = 12.f

◆ panelPadY

float KdaCounter::panelPadY = 6.f

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