helios/engine/mechanics/combat/README.md File
Namespaces Index
| namespace | combat |
|
Combat-related gameplay systems, components, and commands. More... | |
File Listing
The file content with the documentation metadata removed is:
# helios::engine::mechanics::combat
Combat-related gameplay systems, components, and commands.
## Overview
This module provides building blocks for implementing combat mechanics such as aiming, shooting, and projectile spawning.
## Submodules
| Submodule | Purpose |
|-----------|---------|
| `commands/` | Commands for combat actions (ShootCommand, Aim2DCommand) |
| `components/` | Data containers for combat state (aiming, cooldowns) |
| `systems/` | ECS systems for processing combat logic (ProjectileSpawnSystem) |
## Key Classes
| Class | Purpose |
|-------|---------|
| `Aim2DComponent` | Stores aiming direction and fire frequency |
| `ShootComponent` | Weapon cooldown, spawn profile reference, emitter state |
| `Aim2DCommand` | Updates aim direction from input |
| `ShootCommand` | Triggers projectile spawn when cooldown allows |
| `ProjectileSpawnSystem` | Reads shoot state and enqueues spawn commands |
## Architecture
Combat follows the command pattern integrated with the spawn system:
1 Input systems generate `ShootCommand` and `Aim2DCommand`
2 Commands update `ShootComponent` and `Aim2DComponent` state
3 `ProjectileSpawnSystem` reads component state and generates `SpawnCommand`
4 Spawn system handles actual projectile creation via pool and profile
---
<details>
<summary>Doxygen</summary><p>
@namespace helios::engine::mechanics::combat
@brief Combat-related gameplay systems, components, and commands.
@details This namespace contains the combat layer of the gameplay system. It includes components for storing weapon and aiming state, commands for translating input into combat actions, and systems for spawning projectiles.
</p></details>
Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.15.0.