|
Aegis2D
Modular C++26 2D game engine for networked games
|
How much damage an entity deals to what it hits. More...
#include <aegis2d/ecs/components.hpp>
Public Attributes | |
| std::int32_t | amount = 1 |
| Health points removed from the target by one hit. | |
| bool | consumed_on_hit = true |
true if the entity disappears after its first hit (missiles). | |
How much damage an entity deals to what it hits.
Used with Collider masks: when an entity with Damage hits an entity with Health (see ecs::apply_damage()), the target loses amount points. A missile is consumed by its first hit; a player that rams an enemy is not.
| std::int32_t aegis2d::ecs::Damage::amount = 1 |
Health points removed from the target by one hit.
| bool aegis2d::ecs::Damage::consumed_on_hit = true |
true if the entity disappears after its first hit (missiles).