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

ECS component: one-shot weapon pickup spawned at a player's death position. More...

#include <DroppedWeapon.hpp>

Public Attributes

WeaponType type = WeaponType::Rifle
 Weapon type from the slot's GunInstance.
int totalAmmo = 0
 Reserve ammo at death.
int currentMagAmmo = 0
 Ammo in the magazine at death.
float despawnTimer = 0.0f
 Seconds until the entity is destroyed.

Detailed Description

ECS component: one-shot weapon pickup spawned at a player's death position.

Snapshots the slot's GunInstance ammo at death; pickup grants those exact ammo counts (no full-mag refill like world spawners). Lifetime is bounded by despawnTimer; pickup or expiry destroys the entity.

Member Data Documentation

◆ currentMagAmmo

int DroppedWeapon::currentMagAmmo = 0

Ammo in the magazine at death.

◆ despawnTimer

float DroppedWeapon::despawnTimer = 0.0f

Seconds until the entity is destroyed.

◆ totalAmmo

int DroppedWeapon::totalAmmo = 0

Reserve ammo at death.

◆ type

WeaponType DroppedWeapon::type = WeaponType::Rifle

Weapon type from the slot's GunInstance.


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