HealthConfig.ixx File
Configuration for health components. More...
Included Headers
#include <helios.engine.mechanics.match.components>
#include <helios.engine.mechanics.health>
#include <helios.engine.ecs.GameObject>
Namespaces Index
| namespace | helios |
| namespace | engine |
|
Main engine module aggregating core infrastructure and game systems. More... | |
| namespace | builder |
|
Fluent builder pattern for constructing GameObjects. More... | |
| namespace | gameObject |
|
Factory and prototype classes for GameObject construction. More... | |
| namespace | builders |
|
Domain-specific builders for configuring different aspects of GameObjects. More... | |
| namespace | configs |
|
Fine-grained configuration classes for component setup. More... | |
Classes Index
| class | HealthConfig |
|
Fluent configuration for HealthComponent setup. More... | |
Description
Configuration for health components.
File Listing
The file content with the documentation metadata removed is:
14using namespace helios::engine::mechanics::health::components;
15using namespace helios::engine::mechanics::match::components;
16using namespace helios::engine::mechanics::health::types;
18export namespace helios::engine::builder::gameObject::builders::configs {
27 class HealthConfig {
32 helios::engine::ecs::GameObject gameObject_;
41 explicit HealthConfig(helios::engine::ecs::GameObject gameObject) : gameObject_(gameObject) {
42 gameObject.add<HealthComponent>();
52 HealthConfig& maxHealth(const float maxHealth) {
53 gameObject_.getOrAdd<HealthComponent>()
54 .setMaxHealth(maxHealth);
55 gameObject_.getOrAdd<HealthComponent>()
56 .heal(maxHealth);
70 HealthConfig& lives(const size_t lives) {
71 gameObject_.getOrAdd<LivesComponent>(lives);
85 HealthConfig& healthDepletedTriggers(const HealthDepletedBehavior behavior) {
86 gameObject_.getOrAdd<HealthComponent>()
Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.15.0.