Skip to main content

ChaseConfig Class

Fluent configuration for AI chase behavior. More...

Declaration

class helios::engine::builder::gameObject::builders::configs::ChaseConfig { ... }

Public Constructors Index

ChaseConfig (helios::engine::ecs::GameObject gameObject)

Constructs a ChaseConfig and adds ChaseComponent. More...

Public Member Functions Index

ChaseConfig &target (const helios::engine::ecs::EntityHandle &entityHandle)

Sets the target entity to chase. More...

ChaseConfig &seekInterval (const float interval)

Sets the interval between target position updates. More...

Private Member Attributes Index

helios::engine::ecs::GameObjectgameObject_

Non-owning pointer to the target GameObject. More...

Description

Fluent configuration for AI chase behavior.

Automatically adds ChaseComponent and provides methods for setting the chase target and seek interval.

Definition at line 28 of file ChaseConfig.ixx.

Public Constructors

ChaseConfig()

helios::engine::builder::gameObject::builders::configs::ChaseConfig::ChaseConfig (helios::engine::ecs::GameObject gameObject)
inline explicit

Constructs a ChaseConfig and adds ChaseComponent.

Parameters
<a href="/docs/helios/namespaces/helios/engine/builder/gameobject">gameObject</a>

Target GameObject to configure.

Definition at line 42 of file ChaseConfig.ixx.

Referenced by seekInterval and target.

Public Member Functions

seekInterval()

ChaseConfig & helios::engine::builder::gameObject::builders::configs::ChaseConfig::seekInterval (const float interval)
inline

Sets the interval between target position updates.

Parameters
interval

Time in seconds between seek updates.

Returns

Reference to this config for chaining.

Definition at line 68 of file ChaseConfig.ixx.

68 ChaseConfig& seekInterval(const float interval) {
70 .setCooldown(interval);
71
72 return *this;
73 }

Reference ChaseConfig.

target()

ChaseConfig & helios::engine::builder::gameObject::builders::configs::ChaseConfig::target (const helios::engine::ecs::EntityHandle & entityHandle)
inline

Sets the target entity to chase.

Parameters
entityHandle

The handle of the target GameObject.

Returns

Reference to this config for chaining.

Definition at line 53 of file ChaseConfig.ixx.

54 assert(entityHandle.isValid() && "Unexpected invalid entityHandle");
56 .setTarget(entityHandle);
57
58 return *this;
59 }

References ChaseConfig and helios::engine::ecs::EntityHandle::isValid.

Private Member Attributes

gameObject_

helios::engine::ecs::GameObject helios::engine::builder::gameObject::builders::configs::ChaseConfig::gameObject_

Non-owning pointer to the target GameObject.

Definition at line 33 of file ChaseConfig.ixx.


The documentation for this class was generated from the following file:


Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.15.0.