Skip to main content

ScoreValueConfig Class

Fluent configuration for ScoreValueComponent setup. More...

Declaration

class helios::engine::builder::gameObject::builders::configs::ScoreValueConfig { ... }

Public Constructors Index

ScoreValueConfig (helios::engine::ecs::GameObject gameObject)

Constructs a ScoreValueConfig. More...

Public Member Functions Index

template <typename T, typename... Args>
ScoreValueConfig &score (Args &&... args)

Adds a ScoreValueComponent with the specified score type. More...

Private Member Attributes Index

helios::engine::ecs::GameObjectgameObject_

Non-owning pointer to the target GameObject. More...

Description

Fluent configuration for ScoreValueComponent setup.

Provides a template method for adding ScoreValueComponent with a specific score type (e.g., KillReward).

Definition at line 25 of file ScoreValueConfig.ixx.

Public Constructors

ScoreValueConfig()

helios::engine::builder::gameObject::builders::configs::ScoreValueConfig::ScoreValueConfig (helios::engine::ecs::GameObject gameObject)
inline explicit

Constructs a ScoreValueConfig.

Parameters
<a href="/docs/helios/namespaces/helios/engine/builder/gameobject">gameObject</a>

Target GameObject to configure.

Definition at line 39 of file ScoreValueConfig.ixx.

Referenced by score.

Public Member Functions

score()

template <typename T, typename... Args>
ScoreValueConfig & helios::engine::builder::gameObject::builders::configs::ScoreValueConfig::score (Args &&... args)
inline

Adds a ScoreValueComponent with the specified score type.

Template Parameters
T

The score type (must derive from Score).

Args

Constructor argument types.

Parameters
args

Arguments forwarded to the score type constructor.

Returns

Reference to this config for chaining.

Definition at line 54 of file ScoreValueConfig.ixx.

54 ScoreValueConfig& score(Args&&... args) {
55
57
58 assert(!svc && "Component already available.");
59
60 gameObject_.add<helios::engine::mechanics::scoring::components::ScoreValueComponent<T>>(std::forward<Args>(args)...);
61
62 return *this;
63 }

Reference ScoreValueConfig.

Private Member Attributes

gameObject_

helios::engine::ecs::GameObject helios::engine::builder::gameObject::builders::configs::ScoreValueConfig::gameObject_

Non-owning pointer to the target GameObject.

Definition at line 30 of file ScoreValueConfig.ixx.


The documentation for this class was generated from the following file:


Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.15.0.