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

Snapshot of game state consumed by the HUD each frame. More...

#include <HudTypes.hpp>

Collaboration diagram for HudGameState:
[legend]

Public Attributes

int health = 100
int maxHealth = 100
int armor = 0
int maxArmor = 100
int ammoClip = 30
int ammoReserve = 90
int weaponId = 0
float roundTimeRemaining = 0.f
bool isAlive = true
bool isBuyPhase = false
std::span< const HudKillFeedEntrykillFeedEvents
std::span< const HudDamageEventdamageEvents
std::span< const HudHitConfirmhitConfirms
std::span< const HudDamageNumberdamageNumbers
 Floating damage numbers to spawn this frame.
HudDamageAccum damageAccum
 Running damage total to current target.
glm::mat4 viewProj {1.f}
std::span< const HudTeamMemberStatusallies
std::span< const HudTeamMemberStatusenemies
int allyScore = 0
int enemyScore = 0
float localPlayerX = 0.f
float localPlayerZ = 0.f
float localPlayerYaw = 0.f
 Player facing direction (radians, 0 = +Z, CW).
std::span< const HudMinimapDotenemyDots
float minimapWorldRange = 1000.f
 World units visible in each direction from center.
bool tookDamage = false
 True the frame health or armor decreased.
float damageIntensity = 0.f
 0..1 fraction of max-health lost this frame.
bool armorBroke = false
 True the frame armor dropped to zero.
bool pickupAvailable = false
 True when a pickup is currently actionable.
int pickupWeaponId = 0
 Mirrors WeaponType: 0=Rifle, 1=Rocket, 2=RailGun, 3=EnergyGun.
float screenW = 1280.f
float screenH = 720.f

Detailed Description

Snapshot of game state consumed by the HUD each frame.

Filled by Game from ECS data. The HUD never imports ECS headers.

Member Data Documentation

◆ allies

std::span<const HudTeamMemberStatus> HudGameState::allies

◆ allyScore

int HudGameState::allyScore = 0

◆ ammoClip

int HudGameState::ammoClip = 30

◆ ammoReserve

int HudGameState::ammoReserve = 90

◆ armor

int HudGameState::armor = 0

◆ armorBroke

bool HudGameState::armorBroke = false

True the frame armor dropped to zero.

◆ damageAccum

HudDamageAccum HudGameState::damageAccum

Running damage total to current target.

◆ damageEvents

std::span<const HudDamageEvent> HudGameState::damageEvents

◆ damageIntensity

float HudGameState::damageIntensity = 0.f

0..1 fraction of max-health lost this frame.

◆ damageNumbers

std::span<const HudDamageNumber> HudGameState::damageNumbers

Floating damage numbers to spawn this frame.

◆ enemies

std::span<const HudTeamMemberStatus> HudGameState::enemies

◆ enemyDots

std::span<const HudMinimapDot> HudGameState::enemyDots

◆ enemyScore

int HudGameState::enemyScore = 0

◆ health

int HudGameState::health = 100

◆ hitConfirms

std::span<const HudHitConfirm> HudGameState::hitConfirms

◆ isAlive

bool HudGameState::isAlive = true

◆ isBuyPhase

bool HudGameState::isBuyPhase = false

◆ killFeedEvents

std::span<const HudKillFeedEntry> HudGameState::killFeedEvents

◆ localPlayerX

float HudGameState::localPlayerX = 0.f

◆ localPlayerYaw

float HudGameState::localPlayerYaw = 0.f

Player facing direction (radians, 0 = +Z, CW).

◆ localPlayerZ

float HudGameState::localPlayerZ = 0.f

◆ maxArmor

int HudGameState::maxArmor = 100

◆ maxHealth

int HudGameState::maxHealth = 100

◆ minimapWorldRange

float HudGameState::minimapWorldRange = 1000.f

World units visible in each direction from center.

◆ pickupAvailable

bool HudGameState::pickupAvailable = false

True when a pickup is currently actionable.

◆ pickupWeaponId

int HudGameState::pickupWeaponId = 0

Mirrors WeaponType: 0=Rifle, 1=Rocket, 2=RailGun, 3=EnergyGun.

◆ roundTimeRemaining

float HudGameState::roundTimeRemaining = 0.f

◆ screenH

float HudGameState::screenH = 720.f

◆ screenW

float HudGameState::screenW = 1280.f

◆ tookDamage

bool HudGameState::tookDamage = false

True the frame health or armor decreased.

◆ viewProj

glm::mat4 HudGameState::viewProj {1.f}

◆ weaponId

int HudGameState::weaponId = 0

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