Skip to main content

ChaseConfig.ixx File

Configuration for AI chase behavior. 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

classChaseConfig

Fluent configuration for AI chase behavior. More...

Description

Configuration for AI chase behavior.

File Listing

The file content with the documentation metadata removed is:

1/**
2 * @file ChaseConfig.ixx
3 * @brief Configuration for AI chase behavior.
4 */
5module;
6
7#include <cassert>
8
9export module helios.engine.builder.gameObject.builders.configs.ChaseConfig;
10
11import helios.engine.ecs.GameObject;
12
13import helios.util.Guid;
14
15import helios.engine.modules.ai.components.ChaseComponent;
16
17import helios.engine.ecs.EntityHandle;
18
19
21
22 /**
23 * @brief Fluent configuration for AI chase behavior.
24 *
25 * Automatically adds ChaseComponent and provides methods
26 * for setting the chase target and seek interval.
27 */
28 class ChaseConfig {
29
30 /**
31 * @brief Non-owning pointer to the target GameObject.
32 */
34
35 public:
36
37 /**
38 * @brief Constructs a ChaseConfig and adds ChaseComponent.
39 *
40 * @param gameObject Target GameObject to configure.
41 */
44 }
45
46 /**
47 * @brief Sets the target entity to chase.
48 *
49 * @param entityHandle The handle of the target GameObject.
50 *
51 * @return Reference to this config for chaining.
52 */
54 assert(entityHandle.isValid() && "Unexpected invalid entityHandle");
56 .setTarget(entityHandle);
57
58 return *this;
59 }
60
61 /**
62 * @brief Sets the interval between target position updates.
63 *
64 * @param interval Time in seconds between seek updates.
65 *
66 * @return Reference to this config for chaining.
67 */
68 ChaseConfig& seekInterval(const float interval) {
70 .setCooldown(interval);
71
72 return *this;
73 }
74
75 };
76
77}
78

Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.15.0.