|
group2 0.1.0
CSE 125 Group 2
|
Component attached to armed entities (players). More...
#include <WeaponState.hpp>
Public Attributes | |
| std::array< GunInstance, static_cast< std::size_t >(WeaponSlot::Count)> | slots {} |
| WeaponSlot | current = WeaponSlot::PRIMARY |
| Currently equipped slot. | |
Component attached to armed entities (players).
Slots are stored in a fixed-size array indexed by WeaponSlot. Use the getSlot / getEquippedGun helpers below — do NOT index .slots directly from consumer code. This keeps the slot-ordering an implementation detail of WeaponState and lets us add slots without touching every consumer.
| WeaponSlot WeaponState::current = WeaponSlot::PRIMARY |
Currently equipped slot.
| std::array<GunInstance, static_cast<std::size_t>(WeaponSlot::Count)> WeaponState::slots {} |