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

Struct that defines this weapon's type, cooldown, and ammo. More...

#include <WeaponState.hpp>

Public Attributes

WeaponType type = WeaponType::None
int totalAmmo = 0
int currentMagAmmo = 0
float fireCooldown = 0.f
float chargeTime = 0.f
 Accumulated charge time (charge weapons only).
bool isReloading = false
 True while reload is in progress.
float reloadTime = 0.f
 Time remaining to complete a reload.
float recoilHeat = 0.f
 Recoil heat (decays when not firing).
float recoilIdleTime = 0.f
 Time off trigger before decay starts.
bool firedSinceTriggerPress = false
 Semi-auto gate: blocks re-fire until trigger released.

Detailed Description

Struct that defines this weapon's type, cooldown, and ammo.

Member Data Documentation

◆ chargeTime

float GunInstance::chargeTime = 0.f

Accumulated charge time (charge weapons only).

◆ currentMagAmmo

int GunInstance::currentMagAmmo = 0

◆ fireCooldown

float GunInstance::fireCooldown = 0.f

◆ firedSinceTriggerPress

bool GunInstance::firedSinceTriggerPress = false

Semi-auto gate: blocks re-fire until trigger released.

◆ isReloading

bool GunInstance::isReloading = false

True while reload is in progress.

◆ recoilHeat

float GunInstance::recoilHeat = 0.f

Recoil heat (decays when not firing).

◆ recoilIdleTime

float GunInstance::recoilIdleTime = 0.f

Time off trigger before decay starts.

◆ reloadTime

float GunInstance::reloadTime = 0.f

Time remaining to complete a reload.

◆ totalAmmo

int GunInstance::totalAmmo = 0

◆ type

WeaponType GunInstance::type = WeaponType::None

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