Skip to main content

WeaponConfig.ixx File

Configuration for weapon and combat components. More...

Included Headers

Namespaces Index

namespacehelios
namespaceengine

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

namespacebuilder

Fluent builder pattern for constructing GameObjects. More...

namespacegameObject

Factory and prototype classes for GameObject construction. More...

namespacebuilders

Domain-specific builders for configuring different aspects of GameObjects. More...

namespaceconfigs

Fine-grained configuration classes for component setup. More...

Classes Index

classWeaponConfig

Fluent configuration for weapon and projectile systems. More...

Description

Configuration for weapon and combat components.

File Listing

The file content with the documentation metadata removed is:

1/**
2 * @file WeaponConfig.ixx
3 * @brief Configuration for weapon and combat components.
4 */
5module;
6
7#include <cassert>
8#include <memory>
9
10export module helios.engine.builder.gameObject.builders.configs.WeaponConfig;
11
12import helios.engine.ecs.GameObject;
13
14import helios.engine.modules.spatial.transform.components;
15
16import helios.engine.mechanics.combat.components;
17
19
20 /**
21 * @brief Fluent configuration for weapon and projectile systems.
22 *
23 * Automatically adds Aim2DComponent and provides methods
24 * for setting fire rate and other weapon parameters.
25 */
27
28 /**
29 * @brief Non-owning pointer to the target GameObject.
30 */
32
33 public:
34
35 /**
36 * @brief Constructs a WeaponConfig and adds Aim2DComponent.
37 *
38 * @param gameObject Target GameObject to configure.
39 */
42 }
43
44 /**
45 * @brief Sets the weapon fire rate.
46 *
47 * @param fireRate Time in seconds between shots.
48 *
49 * @return Reference to this config for chaining.
50 */
53 .setFireRate(fireRate);
54
57 assert(transformComponent_ != nullptr && "Unexpected nullptr for transformComponent_");
58 assert(ac != nullptr && "Unexpected nullptr for Aim2DComponent");
59
60 return *this;
61 }
62
63 };
64
65}
66

Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.15.0.