EmitterInitializer Class
Initializer that configures spawned entities based on emitter state. More...
Declaration
Base class
| class | SpawnInitializer |
|
Abstract interface for initializing spawned entity state. More... | |
Public Member Functions Index
| void | initialize (helios::engine::ecs::GameObject gameObject, const SpawnPlanCursor &cursor, const SpawnContext &spawnContext) override |
|
Initializes entity with emitter's velocity direction. More... | |
Description
Initializer that configures spawned entities based on emitter state.
EmitterInitializer uses the velocity from the EmitterContext to set the direction and movement intent of spawned entities. This is commonly used for projectiles that should inherit direction from the firing entity.
Components affected:
- **Move2DComponent:** Sets move intent in emitter's direction
- **DirectionComponent:** Sets direction to normalized emitter velocity
- **SteeringComponent:** Sets steering intent in emitter's direction
- Precondition
The SpawnContext must contain a valid EmitterContext.
- See Also
- See Also
Definition at line 40 of file EmitterInitializer.ixx.
Public Member Functions
initialize()
| inline virtual |
Initializes entity with emitter's velocity direction.
- Parameters
-
gameObject The entity to initialize.
cursor The current position within the spawn batch (unused).
spawnContext Context containing the emitter information.
- Precondition
spawnContext.emitterContext must have a value.
Definition at line 53 of file EmitterInitializer.ixx.
References helios::engine::runtime::spawn::types::SpawnContext::emitterContext and helios::engine::ecs::GameObject::get.
The documentation for this class was generated from the following file:
Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.15.0.