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

#include <TeamStatusBar.hpp>

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

Public Member Functions

 TeamStatusBar ()
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 indicatorSize = 14.f
float indicatorSpacing = 5.f
float scoreFontSize = 24.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 allyAlive_ = 0
int allyTotal_ = 0
int enemyAlive_ = 0
int enemyTotal_ = 0
int allyScore_ = 0
int enemyScore_ = 0

Constructor & Destructor Documentation

◆ TeamStatusBar()

TeamStatusBar::TeamStatusBar ( )

Member Function Documentation

◆ draw()

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

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

Implements HudWidget.

Member Data Documentation

◆ allyAlive_

int TeamStatusBar::allyAlive_ = 0
private

◆ allyScore_

int TeamStatusBar::allyScore_ = 0
private

◆ allyTotal_

int TeamStatusBar::allyTotal_ = 0
private

◆ enemyAlive_

int TeamStatusBar::enemyAlive_ = 0
private

◆ enemyScore_

int TeamStatusBar::enemyScore_ = 0
private

◆ enemyTotal_

int TeamStatusBar::enemyTotal_ = 0
private

◆ indicatorSize

float TeamStatusBar::indicatorSize = 14.f

◆ indicatorSpacing

float TeamStatusBar::indicatorSpacing = 5.f

◆ scoreFontSize

float TeamStatusBar::scoreFontSize = 24.f

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