Skip to main content

SpawnProfile.ixx File

Configuration profile defining how entities are spawned and initialized. More...

Included Headers

Namespaces Index

namespacehelios
namespaceengine

Main engine module aggregating core infrastructure and game systems. More...

namespaceruntime

Runtime infrastructure for game execution and lifecycle orchestration. More...

namespacespawn

Entity spawning infrastructure for the helios engine. More...

Classes Index

structSpawnProfile

Configuration profile defining spawn behavior for a pool. More...

Description

Configuration profile defining how entities are spawned and initialized.

File Listing

The file content with the documentation metadata removed is:

1/**
2 * @file SpawnProfile.ixx
3 * @brief Configuration profile defining how entities are spawned and initialized.
4 */
5module;
6
7#include <memory>
8
9export module helios.engine.runtime.spawn.SpawnProfile;
10
11import helios.engine.runtime.spawn.behavior.SpawnPlacer;
12import helios.engine.runtime.spawn.behavior.SpawnInitializer;
13import helios.engine.core.data.GameObjectPoolId;
14
15export namespace helios::engine::runtime::spawn {
16
17 /**
18 * @brief Configuration profile defining spawn behavior for a pool.
19 *
20 * @details SpawnProfile bundles a pool ID with the behaviors that control
21 * how spawned entities are positioned and initialized. Each profile is
22 * registered with a SpawnProfileId in the SpawnManager.
23 *
24 * A profile consists of:
25 * - **Pool ID:** Which pool to acquire entities from
26 * - **Placer:** Determines spawn position (random, formation, emitter-relative)
27 * - **Initializer:** Configures entity state (velocity, direction, stats)
28 *
29 * Example:
30 * ```cpp
31 * auto profile = std::make_unique<SpawnProfile>(SpawnProfile{
32 * .gameObjectPoolId = bulletPoolId,
33 * .spawnPlacer = std::make_unique<EmitterRelativePlacer>(),
34 * .spawnInitializer = std::make_unique<ProjectileInitializer>(speed)
35 * });
36 * spawnManager.addSpawnProfile(profileId, std::move(profile));
37 * ```
38 *
39 * @see SpawnPlacer
40 * @see SpawnInitializer
41 * @see SpawnManager
42 */
43 struct SpawnProfile {
44
45 /**
46 * @brief The pool from which entities are acquired.
47 */
49
50 /**
51 * @brief Strategy for determining spawn positions.
52 */
53 std::unique_ptr<helios::engine::runtime::spawn::behavior::SpawnPlacer> spawnPlacer;
54
55 /**
56 * @brief Strategy for initializing spawned entity state.
57 */
58 std::unique_ptr<helios::engine::runtime::spawn::behavior::SpawnInitializer> spawnInitializer;
59
60 };
61
62}

Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.15.0.