Skip to main content

WeaponConfig Class

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

Declaration

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

Public Constructors Index

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

Constructs a WeaponConfig and adds Aim2DComponent. More...

Public Member Functions Index

WeaponConfig &fireRate (const float fireRate)

Sets the weapon fire rate. More...

Private Member Attributes Index

helios::engine::ecs::GameObjectgameObject_

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

Description

Fluent configuration for weapon and projectile systems.

Automatically adds Aim2DComponent and provides methods for setting fire rate and other weapon parameters.

Definition at line 26 of file WeaponConfig.ixx.

Public Constructors

WeaponConfig()

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

Constructs a WeaponConfig and adds Aim2DComponent.

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

Target GameObject to configure.

Definition at line 40 of file WeaponConfig.ixx.

Referenced by fireRate.

Public Member Functions

fireRate()

WeaponConfig & helios::engine::builder::gameObject::builders::configs::WeaponConfig::fireRate (const float fireRate)
inline

Sets the weapon fire rate.

Parameters
fireRate

Time in seconds between shots.

Returns

Reference to this config for chaining.

Definition at line 51 of file WeaponConfig.ixx.

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 }

References fireRate and WeaponConfig.

Referenced by fireRate.

Private Member Attributes

gameObject_

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

Non-owning pointer to the target GameObject.

Definition at line 31 of file WeaponConfig.ixx.


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


Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.15.0.