Skip to main content

ApplyDamageCommand Class

Command that carries a DamageContext for deferred damage processing. More...

Declaration

class helios::engine::mechanics::damage::commands::ApplyDamageCommand { ... }

Public Constructors Index

ApplyDamageCommand (const DamageContext &damageContext)

Constructs a command from a damage context. More...

Public Member Functions Index

autodamageContext () const noexcept

Returns the damage context. More...

Private Member Attributes Index

DamageContextdamageContext_

The damage context describing target, instigator, and amount. More...

Description

Command that carries a DamageContext for deferred damage processing.

Issued by damage-producing systems (e.g. DamageOnCollisionSystem) and submitted to the HealthManager via the TypedCommandHandler interface during the command flush phase.

See Also

DamageContext

See Also

HealthManager

Definition at line 25 of file ApplyDamageCommand.ixx.

Public Constructors

ApplyDamageCommand()

helios::engine::mechanics::damage::commands::ApplyDamageCommand::ApplyDamageCommand (const DamageContext & damageContext)
inline explicit

Constructs a command from a damage context.

Parameters
damageContext

The context describing the damage to apply.

Definition at line 39 of file ApplyDamageCommand.ixx.

40 : damageContext_(damageContext) {}

Reference damageContext.

Public Member Functions

damageContext()

auto helios::engine::mechanics::damage::commands::ApplyDamageCommand::damageContext ()
inline nodiscard noexcept

Returns the damage context.

Returns

The stored DamageContext.

Definition at line 47 of file ApplyDamageCommand.ixx.

47 [[nodiscard]] auto damageContext() const noexcept {
48 return damageContext_;
49 }

Referenced by ApplyDamageCommand.

Private Member Attributes

damageContext_

DamageContext helios::engine::mechanics::damage::commands::ApplyDamageCommand::damageContext_

The damage context describing target, instigator, and amount.

Definition at line 30 of file ApplyDamageCommand.ixx.

30 DamageContext damageContext_;

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


Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.15.0.