Skip to main content

PlayerDiedEvent.ixx File

Event emitted when the player entity dies. 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...

namespacematch

Match state management for the helios engine. More...

namespaceevents

Events related to match rule processing. More...

Classes Index

classPlayerDiedEvent

Event signalling that the player entity has died. More...

Description

Event emitted when the player entity dies.

File Listing

The file content with the documentation metadata removed is:

1/**
2 * @file PlayerDiedEvent.ixx
3 * @brief Event emitted when the player entity dies.
4 */
5module;
6
7export module helios.engine.mechanics.match.events.PlayerDiedEvent;
8
9import helios.engine.ecs;
10import helios.util.Guid;
11import helios.math;
12import helios.engine.mechanics.health.types.HealthChangeContext;
13import helios.core.types;
14import helios.engine.ecs.EntityHandle;
15
16using namespace helios::engine::ecs;
17
19
20 /**
21 * @brief Event signalling that the player entity has died.
22 *
23 * Consumed by match-rule systems to trigger life loss, game-over
24 * transitions, or respawn logic.
25 */
27
28 /**
29 * @brief Handle of the player entity that died.
30 */
31 EntityHandle source_;
32
33 public:
34
35 /**
36 * @brief Constructs a PlayerDiedEvent.
37 *
38 * @param source Handle of the deceased player entity.
39 */
40 explicit PlayerDiedEvent(const EntityHandle source) : source_(source) {}
41
42 /**
43 * @brief Returns the handle of the deceased player entity.
44 *
45 * @return The source EntityHandle.
46 */
47 [[nodiscard]] EntityHandle source() const noexcept {
48 return source_;
49 }
50
51 };
52
53
54}

Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.15.0.