|
Air-Trap 1.0.0
A multiplayer R-Type clone game engine built with C++23 and ECS architecture
|
Component representing a weapon configuration. More...
#include <SimpleWeapon.hpp>
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. | |
Component representing a weapon configuration.
Definition at line 30 of file SimpleWeapon.hpp.
| int rtp::ecs::components::SimpleWeapon::ammo {-1} |
Current ammo (-1 = infinite)
Definition at line 37 of file SimpleWeapon.hpp.
Referenced by rtp::server::EntitySystem::applyWeaponToEntity(), rtp::config::loadWeaponConfigs(), and rtp::client::NetworkSyncSystem::onSpawnEntityFromServer().
| bool rtp::ecs::components::SimpleWeapon::beamActive {false} |
Is beam currently firing.
Definition at line 44 of file SimpleWeapon.hpp.
| float rtp::ecs::components::SimpleWeapon::beamActiveTime {0.0f} |
Current beam activity timer.
Definition at line 43 of file SimpleWeapon.hpp.
| float rtp::ecs::components::SimpleWeapon::beamCooldown {0.0f} |
Beam cooldown time (Beam)
Definition at line 42 of file SimpleWeapon.hpp.
Referenced by rtp::server::EntitySystem::applyWeaponToEntity(), rtp::config::loadWeaponConfigs(), and rtp::client::NetworkSyncSystem::onSpawnEntityFromServer().
| float rtp::ecs::components::SimpleWeapon::beamCooldownRemaining {0.0f} |
Remaining cooldown for beam (runtime)
Definition at line 45 of file SimpleWeapon.hpp.
| 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().
| bool rtp::ecs::components::SimpleWeapon::beamWasDouble {false} |
Was the beam started as double-fire.
Definition at line 46 of file SimpleWeapon.hpp.
| bool rtp::ecs::components::SimpleWeapon::boomerangOut {false} |
Boomerang currently flying.
Definition at line 55 of file SimpleWeapon.hpp.
| int rtp::ecs::components::SimpleWeapon::damage {10} |
Damage per shot.
Definition at line 34 of file SimpleWeapon.hpp.
Referenced by rtp::server::EntitySystem::createEnemyEntity(), rtp::config::loadWeaponConfigs(), and rtp::client::NetworkSyncSystem::onSpawnEntityFromServer().
| 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().
| float rtp::ecs::components::SimpleWeapon::fireRate {0.3f} |
Shots per second (or cooldown)
Definition at line 32 of file SimpleWeapon.hpp.
Referenced by rtp::server::EntitySystem::createEnemyEntity(), rtp::config::loadWeaponConfigs(), and rtp::client::NetworkSyncSystem::onSpawnEntityFromServer().
| 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().
| 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().
| 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().
| bool rtp::ecs::components::SimpleWeapon::isBoomerang {false} |
Projectile returns (Boomerang)
Definition at line 54 of file SimpleWeapon.hpp.
Referenced by rtp::server::EntitySystem::createEnemyEntity(), rtp::config::loadWeaponConfigs(), and rtp::client::NetworkSyncSystem::onSpawnEntityFromServer().
| WeaponKind rtp::ecs::components::SimpleWeapon::kind {WeaponKind::Classic} |
Weapon type.
Definition at line 31 of file SimpleWeapon.hpp.
Referenced by rtp::server::EntitySystem::applyWeaponToEntity(), rtp::server::EntitySystem::createEnemyEntity(), rtp::server::EntitySystem::createPlayerEntity(), rtp::config::loadWeaponConfigs(), and rtp::client::NetworkSyncSystem::onSpawnEntityFromServer().
| float rtp::ecs::components::SimpleWeapon::lastShotTime {0.0f} |
Time since last shot.
Definition at line 33 of file SimpleWeapon.hpp.
Referenced by rtp::server::EntitySystem::createEnemyEntity(), rtp::config::loadWeaponConfigs(), and rtp::server::EnemyShootSystem::update().
| int rtp::ecs::components::SimpleWeapon::maxAmmo {-1} |
Max ammo (-1 = infinite)
Definition at line 38 of file SimpleWeapon.hpp.
Referenced by rtp::server::EntitySystem::applyWeaponToEntity(), rtp::config::loadWeaponConfigs(), and rtp::client::NetworkSyncSystem::onSpawnEntityFromServer().