|
Aegis2D
Modular C++26 2D game engine for networked games
|
Gameplay events: explosions and deaths, published on the core event bus. More...
#include <aegis2d/core/event_bus.hpp>#include <aegis2d/core/math.hpp>#include <aegis2d/ecs/components.hpp>#include <aegis2d/ecs/damage.hpp>#include <aegis2d/ecs/entity.hpp>#include <aegis2d/ecs/lives.hpp>#include <aegis2d/ecs/registry.hpp>#include <span>#include <aegis2d/shmup/weapons.hpp>Go to the source code of this file.
Classes | |
| struct | aegis2d::ecs::Explosion |
| An entity whose health reached zero blows up: an enemy shot down, or a player that loses a life. More... | |
Namespaces | |
| namespace | aegis2d |
| Root namespace of the engine. | |
| namespace | aegis2d::ecs |
| Entity-Component-System used by client and server. | |
Functions | |
| void | aegis2d::ecs::publish_explosions (core::EventBus &events, const Registry ®istry, const DamageReport &report) |
| Publishes an Explosion for each kill of the tick, in the order of the kills. | |
| void | aegis2d::ecs::publish_deaths (core::EventBus &events, std::span< const LifeLost > lost) |
| Publishes each player's death of the tick. | |
Gameplay events: explosions and deaths, published on the core event bus.
The gameplay systems list what happened during a tick (the DamageReport of apply_damage(), the LifeLost of handle_player_deaths()); these functions publish it on a core::EventBus, so audio and visual effects react to it without gameplay code knowing them (shots are published by the shmup module, shmup::publish_shots()):