Air-Trap 1.0.0
A multiplayer R-Type clone game engine built with C++23 and ECS architecture
Loading...
Searching...
No Matches
rtp::ecs::components::SimpleWeapon Struct Reference

Component representing a weapon configuration. More...

#include <SimpleWeapon.hpp>

Collaboration diagram for rtp::ecs::components::SimpleWeapon:

Public Attributes

WeaponKind kind {WeaponKind::Classic}
 Weapon type.
 
float fireRate {0.3f}
 Shots per second (or cooldown)
 
float lastShotTime {0.0f}
 Time since last shot.
 
int damage {10}
 Damage per shot.
 
int ammo {-1}
 Current ammo (-1 = infinite)
 
int maxAmmo {-1}
 Max ammo (-1 = infinite)
 
float beamDuration {0.0f}
 Beam active time (Beam)
 
float beamCooldown {0.0f}
 Beam cooldown time (Beam)
 
float beamActiveTime {0.0f}
 Current beam activity timer.
 
bool beamActive {false}
 Is beam currently firing.
 
float beamCooldownRemaining {0.0f}
 Remaining cooldown for beam (runtime)
 
bool beamWasDouble {false}
 Was the beam started as double-fire.
 
int difficulty {2}
 Difficulty to use this weapon (1-5)
 
bool homing {false}
 Shots home to enemies (Tracker)
 
float homingSteering {3.0f}
 Steering factor for homing bullets.
 
float homingRange {600.0f}
 Detection range for homing bullets.
 
bool isBoomerang {false}
 Projectile returns (Boomerang)
 
bool boomerangOut {false}
 Boomerang currently flying.
 

Detailed Description

Component representing a weapon configuration.

Definition at line 30 of file SimpleWeapon.hpp.

Member Data Documentation

◆ ammo

int rtp::ecs::components::SimpleWeapon::ammo {-1}

◆ beamActive

bool rtp::ecs::components::SimpleWeapon::beamActive {false}

Is beam currently firing.

Definition at line 44 of file SimpleWeapon.hpp.

◆ beamActiveTime

float rtp::ecs::components::SimpleWeapon::beamActiveTime {0.0f}

Current beam activity timer.

Definition at line 43 of file SimpleWeapon.hpp.

◆ beamCooldown

float rtp::ecs::components::SimpleWeapon::beamCooldown {0.0f}

◆ beamCooldownRemaining

float rtp::ecs::components::SimpleWeapon::beamCooldownRemaining {0.0f}

Remaining cooldown for beam (runtime)

Definition at line 45 of file SimpleWeapon.hpp.

◆ beamDuration

float rtp::ecs::components::SimpleWeapon::beamDuration {0.0f}

Beam active time (Beam)

Definition at line 41 of file SimpleWeapon.hpp.

Referenced by rtp::config::loadWeaponConfigs(), and rtp::client::NetworkSyncSystem::onSpawnEntityFromServer().

◆ beamWasDouble

bool rtp::ecs::components::SimpleWeapon::beamWasDouble {false}

Was the beam started as double-fire.

Definition at line 46 of file SimpleWeapon.hpp.

◆ boomerangOut

bool rtp::ecs::components::SimpleWeapon::boomerangOut {false}

Boomerang currently flying.

Definition at line 55 of file SimpleWeapon.hpp.

◆ damage

int rtp::ecs::components::SimpleWeapon::damage {10}

◆ difficulty

int rtp::ecs::components::SimpleWeapon::difficulty {2}

Difficulty to use this weapon (1-5)

Definition at line 48 of file SimpleWeapon.hpp.

Referenced by rtp::config::loadWeaponConfigs().

◆ fireRate

float rtp::ecs::components::SimpleWeapon::fireRate {0.3f}

◆ homing

bool rtp::ecs::components::SimpleWeapon::homing {false}

Shots home to enemies (Tracker)

Definition at line 51 of file SimpleWeapon.hpp.

Referenced by rtp::config::loadWeaponConfigs(), and rtp::client::NetworkSyncSystem::onSpawnEntityFromServer().

◆ homingRange

float rtp::ecs::components::SimpleWeapon::homingRange {600.0f}

Detection range for homing bullets.

Definition at line 53 of file SimpleWeapon.hpp.

Referenced by rtp::config::loadWeaponConfigs().

◆ homingSteering

float rtp::ecs::components::SimpleWeapon::homingSteering {3.0f}

Steering factor for homing bullets.

Definition at line 52 of file SimpleWeapon.hpp.

Referenced by rtp::config::loadWeaponConfigs().

◆ isBoomerang

bool rtp::ecs::components::SimpleWeapon::isBoomerang {false}

◆ kind

◆ lastShotTime

float rtp::ecs::components::SimpleWeapon::lastShotTime {0.0f}

◆ maxAmmo

int rtp::ecs::components::SimpleWeapon::maxAmmo {-1}

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