Helios Engine 0.1.0
A modular ECS based data-oriented C++23 game engine
 
Loading...
Searching...
No Matches
helios::ecs::EntityDestroyedEvent Struct Reference

Event emitted when an entity is destroyed. More...

#include <builtin_events.hpp>

Static Public Member Functions

static constexpr std::string_view GetName () noexcept
 Gets the event name.
 
static constexpr EventClearPolicy GetClearPolicy () noexcept
 Gets the clear policy for this event.
 

Public Attributes

Entity entity
 The destroyed entity.
 

Detailed Description

Event emitted when an entity is destroyed.

This event is automatically emitted by World::DestroyEntity() and related methods if the event is registered via AddEvent<EntityDestroyedEvent>().

Note
Must be trivially copyable for event storage requirements.

Definition at line 41 of file builtin_events.hpp.

Member Function Documentation

◆ GetClearPolicy()

static constexpr EventClearPolicy helios::ecs::EntityDestroyedEvent::GetClearPolicy ( )
inlinestaticconstexprnoexcept

Gets the clear policy for this event.

Returns
Event clear policy (automatic)
Examples
/home/runner/work/HeliosEngine/HeliosEngine/src/core/include/helios/core/ecs/events/builtin_events.hpp.

Definition at line 54 of file builtin_events.hpp.

@ kAutomatic
Events are automatically cleared after double buffer cycle.

◆ GetName()

static constexpr std::string_view helios::ecs::EntityDestroyedEvent::GetName ( )
inlinestaticconstexprnoexcept

Gets the event name.

Returns
Event name string
Examples
/home/runner/work/HeliosEngine/HeliosEngine/src/core/include/helios/core/ecs/events/builtin_events.hpp.

Definition at line 48 of file builtin_events.hpp.

48{ return "EntityDestroyedEvent"; }

Member Data Documentation

◆ entity

Entity helios::ecs::EntityDestroyedEvent::entity