|
Aegis2D
Modular C++26 2D game engine for networked games
|
Gun of a ship: how often it can fire. More...
#include <aegis2d/shmup/components.hpp>
Public Attributes | |
| float | cooldown = 0.25F |
| Seconds between two shots. | |
| float | reload = 0.0F |
| Seconds before the next shot is allowed; 0 when ready. | |
Gun of a ship: how often it can fire.
shmup::trigger_weapons() counts the reload down each tick and lets the ship fire when it reaches zero while ecs::Action::Fire is held, so holding fire shoots at 1 / cooldown shots per second whatever the tick rate, and tapping faster than the cooldown does not shoot faster.
| float aegis2d::shmup::Weapon::cooldown = 0.25F |
Seconds between two shots.
| float aegis2d::shmup::Weapon::reload = 0.0F |
Seconds before the next shot is allowed; 0 when ready.