types Namespace
Type definitions for the health system. More...
Definition
Classes Index
| struct | HealthChangeContext |
|
Describes a health modification applied to an entity. More... | |
Enumerations Index
| enum class | HealthDepletedBehavior : uint16_t { ... } |
|
Bitmask enum describing what happens when an entity's health is depleted. More... | |
Operators Index
| constexpr HealthDepletedBehavior | operator| (HealthDepletedBehavior lhs, HealthDepletedBehavior rhs) noexcept |
|
Bitwise OR operator for combining flags. More... | |
| constexpr HealthDepletedBehavior | operator& (HealthDepletedBehavior lhs, HealthDepletedBehavior rhs) noexcept |
|
Bitwise AND operator for testing flags. More... | |
Functions Index
| constexpr bool | hasHealthDepletedFlag (const HealthDepletedBehavior mask, const HealthDepletedBehavior flag) noexcept |
|
Tests whether a specific flag is set in a mask. More... | |
Description
Type definitions for the health system.
Contains a bitmask enum for health depletion behaviour and a context struct for health updates.
Enumerations
HealthDepletedBehavior
| strong |
Bitmask enum describing what happens when an entity's health is depleted.
- Enumeration values
-
None No action on depletion (= 0) Despawn Queue the entity for despawning (= 1 << 0) DeadTag Attach a DeadTagComponent to the entity (= 1 << 1)
Flags can be combined with the bitwise OR operator to trigger multiple effects simultaneously.
Definition at line 20 of file HealthDepletedBehavior.ixx.
Operators
operator&()
| nodiscard constexpr noexcept |
Bitwise AND operator for testing flags.
- Parameters
-
lhs Left-hand side flag.
rhs Right-hand side flag.
- Returns
Intersection of both flags.
Definition at line 62 of file HealthDepletedBehavior.ixx.
operator|()
| nodiscard constexpr noexcept |
Bitwise OR operator for combining flags.
- Parameters
-
lhs Left-hand side flag.
rhs Right-hand side flag.
- Returns
Combined flags.
Definition at line 47 of file HealthDepletedBehavior.ixx.
Functions
hasHealthDepletedFlag()
| nodiscard constexpr noexcept |
Tests whether a specific flag is set in a mask.
- Parameters
-
mask The bitmask to test.
flag The flag to check for.
- Returns
True if the flag is set.
Definition at line 76 of file HealthDepletedBehavior.ixx.
Referenced by helios::engine::mechanics::health::HealthManager::flush and helios::engine::mechanics::lifecycle::systems::GameObjectLifecycleSystem::update.
The documentation for this namespace was generated from the following file:
Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.15.0.