helios/engine/mechanics/damage/README.md File
Namespaces Index
| namespace | damage |
|
Damage dealing system for game entities. More... | |
File Listing
The file content with the documentation metadata removed is:
# helios::engine::mechanics::damage
Damage dealing system for game entities.
This module provides components and systems for applying damage to entities based on collision events.
## Submodules
| Submodule | Purpose |
|-----------|---------|
| `commands/` | Commands for requesting damage application |
| `components/` | Damage-related ECS components |
| `systems/` | Systems for damage processing |
## Architecture
1 **DamageDealerComponent** defines damage values per collision layer
2 **DamageOnCollisionSystem** listens for `SolidCollisionEvent`
3 When collision occurs, an `ApplyDamageCommand` is issued with a `DamageContext`
4 **HealthManager** receives the command and applies damage to the target
5 **LastDamageComponent** is updated with the damage context for attribution
## Integration
The damage system integrates with:
- **Collision system** - receives `SolidCollisionEvent` for damage triggers
- **Health system** - applies damage via `HealthComponent.takeDamage()`
- **Combat system** - updates `LastDamageComponent` for kill attribution
- **Spawn system** - uses `EmittedByComponent` to track projectile sources
---
<details>
<summary>Doxygen</summary><p>
@namespace helios::engine::mechanics::damage
@brief Damage dealing system for game entities.
@details Provides infrastructure for defining layer-based damage values and applying damage on collision.
</p></details>
Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.15.0.