RandomDirectionInitializer.ixx File
Initializer that configures spawned entities with random direction. More...
Included Headers
#include <helios.util.Random>
#include <helios.math>
#include <helios.engine.runtime.spawn.SpawnContext>
#include <helios.engine.modules.physics.motion.components.DirectionComponent>
#include <helios.engine.modules.physics.motion.components.Move2DComponent>
#include <helios.engine.runtime.spawn.SpawnPlanCursor>
#include <helios.engine.ecs.GameObject>
#include <helios.engine.runtime.spawn.behavior.SpawnInitializer>
Namespaces Index
| namespace | helios |
| namespace | engine |
|
Main engine module aggregating core infrastructure and game systems. More... | |
| namespace | runtime |
|
Runtime infrastructure for game execution and lifecycle orchestration. More... | |
| namespace | spawn |
|
Entity spawning infrastructure for the helios engine. More... | |
| namespace | behavior |
|
Spawn behavior strategies for positioning and initializing entities. More... | |
| namespace | initializers |
|
Concrete SpawnInitializer implementations. More... | |
Classes Index
| class | RandomDirectionInitializer |
|
Initializer that configures spawned entities with random direction. More... | |
Description
Initializer that configures spawned entities with random direction.
File Listing
The file content with the documentation metadata removed is:
18export namespace helios::engine::runtime::spawn::behavior::initializers {
35 class RandomDirectionInitializer final : public SpawnInitializer {
46 void initialize(
47 helios::engine::ecs::GameObject gameObject,
48 const SpawnPlanCursor& cursor,
49 const SpawnContext& spawnContext
52 static auto rGen = helios::util::Random(12345);
54 auto* mc = gameObject.get<helios::engine::modules::physics::motion::components::Move2DComponent>();
55 auto* dc = gameObject.get<helios::engine::modules::physics::motion::components::DirectionComponent>();
57 auto dir = helios::math::vec2f{
Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.15.0.