|
Aegis2D
Modular C++26 2D game engine for networked games
|
Damage on hit: turns collision contacts into lost health, kills and spent missiles. More...
#include <aegis2d/ecs/collision.hpp>#include <aegis2d/ecs/components.hpp>#include <aegis2d/ecs/entity.hpp>#include <aegis2d/ecs/registry.hpp>#include <algorithm>#include <cstddef>#include <cstdint>#include <span>#include <vector>Go to the source code of this file.
Classes | |
| struct | aegis2d::ecs::Hit |
| One hit that removed health points. More... | |
| struct | aegis2d::ecs::Kill |
| An entity whose health reached zero, and the hit that did it. More... | |
| struct | aegis2d::ecs::DamageReport |
| What apply_damage() did during one tick, in the order of the contacts. More... | |
Namespaces | |
| namespace | aegis2d |
| Root namespace of the engine. | |
| namespace | aegis2d::ecs |
| Entity-Component-System used by client and server. | |
Functions | |
| void | aegis2d::ecs::apply_damage (Registry ®istry, std::span< const Contact > contacts, DamageReport &report) |
| Applies the damage of a tick's contacts to the entities' health. | |
| std::size_t | aegis2d::ecs::remove_casualties (Registry ®istry, const DamageReport &report) |
| Destroys the entities that died or were consumed during the tick. | |
Damage on hit: turns collision contacts into lost health, kills and spent missiles.