|
Aegis2D
Modular C++26 2D game engine for networked games
|
Weapon that fires on its own, as soon as it is reloaded (enemies). More...
#include <aegis2d/shmup/components.hpp>
Weapon that fires on its own, as soon as it is reloaded (enemies).
shmup::trigger_auto_weapons() fires the Weapon of every entity with this marker each time its reload reaches zero, so an enemy shoots every Weapon::cooldown seconds with no input. Set the Weapon's first reload to delay the first shot, e.g. to a random value so that enemies spawned together do not fire in step. Entities steered by a player (ecs::PlayerInput) are left to shmup::trigger_weapons().