Skip to main content

ApplyDamageCommand.ixx File

Command for requesting damage application to an entity. More...

Included Headers

Namespaces Index

namespacehelios
namespaceengine

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

namespacemechanics

High-level gameplay systems and components for game logic. More...

namespacedamage

Damage dealing system for game entities. More...

namespacecommands

Damage-related commands for the command buffer. More...

Classes Index

classApplyDamageCommand

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

Description

Command for requesting damage application to an entity.

File Listing

The file content with the documentation metadata removed is:

1/**
2 * @file ApplyDamageCommand.ixx
3 * @brief Command for requesting damage application to an entity.
4 */
5module;
6
7export module helios.engine.mechanics.damage.commands.ApplyDamageCommand;
8
9import helios.engine.common.types;
10
12
14
15 /**
16 * @brief Command that carries a DamageContext for deferred damage processing.
17 *
18 * Issued by damage-producing systems (e.g. DamageOnCollisionSystem) and
19 * submitted to the HealthManager via the TypedCommandHandler interface
20 * during the command flush phase.
21 *
22 * @see DamageContext
23 * @see HealthManager
24 */
26
27 /**
28 * @brief The damage context describing target, instigator, and amount.
29 */
30 DamageContext damageContext_;
31
32 public:
33
34 /**
35 * @brief Constructs a command from a damage context.
36 *
37 * @param damageContext The context describing the damage to apply.
38 */
40 : damageContext_(damageContext) {}
41
42 /**
43 * @brief Returns the damage context.
44 *
45 * @return The stored DamageContext.
46 */
47 [[nodiscard]] auto damageContext() const noexcept {
48 return damageContext_;
49 }
50
51 };
52
53
54}

Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.15.0.