SpawnRuleConfig Class
Fluent configuration for a spawn rule bound to a profile. More...
Declaration
Public Constructors Index
| SpawnRuleConfig (SpawnProfileConfig &parent, helios::engine::runtime::spawn::types::SpawnRuleId ruleId) | |
|
Constructs a SpawnRuleConfig. More... | |
Public Member Functions Index
| SpawnRuleConfig & | timerCondition (const float intervalSeconds) |
|
Sets a timer-based spawn condition. More... | |
| SpawnRuleConfig & | timerWithAvailabilityCondition (const float intervalSeconds) |
|
Sets a combined condition: timer + pool availability. More... | |
| SpawnRuleConfig & | condition (std::unique_ptr< const helios::engine::runtime::spawn::policy::SpawnCondition > customCondition) |
|
Sets a custom spawn condition. More... | |
| SpawnRuleConfig & | fixedAmount (const size_t count) |
|
Sets a fixed spawn amount. More... | |
| SpawnRuleConfig & | amount (std::unique_ptr< const helios::engine::runtime::spawn::policy::amount::SpawnAmountProvider > customProvider) |
|
Sets a custom amount provider. More... | |
| std::unique_ptr< helios::engine::runtime::spawn::policy::SpawnRule > | build () |
|
Builds the SpawnRule from this configuration. More... | |
| SpawnProfileConfig & | done () |
|
Finalizes the rule and returns to the parent profile config. More... | |
Private Member Attributes Index
| SpawnProfileConfig & | parent_ |
|
Parent profile this rule belongs to. More... | |
| helios::engine::runtime::spawn::types::SpawnRuleId | ruleId_ |
|
Unique identifier for this rule. More... | |
| std::unique_ptr< const helios::engine::runtime::spawn::policy::SpawnCondition > | condition_ |
|
Condition determining when to spawn. More... | |
| std::unique_ptr< const helios::engine::runtime::spawn::policy::amount::SpawnAmountProvider > | amountProvider_ |
|
Provider determining how many to spawn. More... | |
Description
Fluent configuration for a spawn rule bound to a profile.
Configures the condition and amount for a scheduled spawn rule. Returns to the parent SpawnProfileConfig via done().
Definition at line 90 of file SpawnPoolConfig.ixx.
Public Constructors
SpawnRuleConfig()
| inline |
Constructs a SpawnRuleConfig.
- Parameters
-
parent The parent profile config.
ruleId Unique identifier for this rule.
Definition at line 120 of file SpawnPoolConfig.ixx.
Referenced by amount, condition, fixedAmount, timerCondition and timerWithAvailabilityCondition.
Public Member Functions
amount()
| inline |
Sets a custom amount provider.
- Parameters
-
customProvider Ownership is transferred.
- Returns
Reference to this config for chaining.
Definition at line 190 of file SpawnPoolConfig.ixx.
Reference SpawnRuleConfig.
build()
| inline nodiscard |
Builds the SpawnRule from this configuration.
- Returns
The assembled SpawnRule.
Definition at line 202 of file SpawnPoolConfig.ixx.
condition()
| inline |
Sets a custom spawn condition.
- Parameters
-
customCondition Ownership is transferred.
- Returns
Reference to this config for chaining.
Definition at line 163 of file SpawnPoolConfig.ixx.
Reference SpawnRuleConfig.
done()
| inline |
Finalizes the rule and returns to the parent profile config.
- Returns
Reference to the parent SpawnProfileConfig.
Definition at line 215 of file SpawnPoolConfig.ixx.
fixedAmount()
| inline |
Sets a fixed spawn amount.
- Parameters
-
count Number of entities to spawn per trigger.
- Returns
Reference to this config for chaining.
Definition at line 177 of file SpawnPoolConfig.ixx.
Reference SpawnRuleConfig.
timerCondition()
| inline |
Sets a timer-based spawn condition.
- Parameters
-
intervalSeconds Seconds between spawn evaluations.
- Returns
Reference to this config for chaining.
Definition at line 133 of file SpawnPoolConfig.ixx.
Reference SpawnRuleConfig.
timerWithAvailabilityCondition()
| inline |
Sets a combined condition: timer + pool availability.
- Parameters
-
intervalSeconds Seconds between spawn evaluations.
- Returns
Reference to this config for chaining.
Definition at line 147 of file SpawnPoolConfig.ixx.
Reference SpawnRuleConfig.
Private Member Attributes
amountProvider_
|
Provider determining how many to spawn.
Definition at line 110 of file SpawnPoolConfig.ixx.
condition_
|
Condition determining when to spawn.
Definition at line 105 of file SpawnPoolConfig.ixx.
parent_
|
Parent profile this rule belongs to.
Definition at line 95 of file SpawnPoolConfig.ixx.
ruleId_
|
Unique identifier for this rule.
Definition at line 100 of file SpawnPoolConfig.ixx.
The documentation for this class was generated from the following file:
Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.15.0.