Skip to main content

HealthChangedEvent.ixx File

Event emitted when an entity's health changes. 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...

namespacehealth

Health management system for game entities. More...

namespaceevents

Health-related events. More...

Classes Index

classHealthChangedEvent

Event carrying details of a health modification. More...

Description

Event emitted when an entity's health changes.

File Listing

The file content with the documentation metadata removed is:

1/**
2 * @file HealthChangedEvent.ixx
3 * @brief Event emitted when an entity's health changes.
4 */
5module;
6
7#include <optional>
8
9export module helios.engine.mechanics.health.events.HealthChangedEvent;
10
11import helios.util.Guid;
12import helios.math;
13import helios.engine.mechanics.health.types.HealthChangeContext;
14import helios.core.types;
15
16import helios.engine.ecs.EntityHandle;
17
19
20 /**
21 * @brief Event carrying details of a health modification.
22 *
23 * Emitted by the health system whenever an entity's health value
24 * changes, allowing observers to react (e.g. UI updates, VFX).
25 */
27
28 /**
29 * @brief Context describing the health change.
30 */
32
33 public:
34
35 /**
36 * @brief Constructs a HealthChangedEvent.
37 *
38 * @param HealthChangeContext Context describing the change.
39 */
42 ) : healthChangeContext_(HealthChangeContext) {}
43
44 /**
45 * @brief Returns the health update context.
46 *
47 * @return The HealthChangeContext for this event.
48 */
50 return healthChangeContext_;
51 }
52
53
54 };
55
56}

Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.15.0.