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

Event emitted when an entity is spawned/created. 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 spawned entity.
 

Detailed Description

Event emitted when an entity is spawned/created.

This event is automatically emitted by World::CreateEntity() and World::ReserveEntity() if the event is registered via AddEvent<EntitySpawnedEvent>().

Note
Must be trivially copyable for event storage requirements.

Definition at line 19 of file builtin_events.hpp.

Member Function Documentation

◆ GetClearPolicy()

static constexpr EventClearPolicy helios::ecs::EntitySpawnedEvent::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 32 of file builtin_events.hpp.

@ kAutomatic
Events are automatically cleared after double buffer cycle.

◆ GetName()

static constexpr std::string_view helios::ecs::EntitySpawnedEvent::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 26 of file builtin_events.hpp.

26{ return "EntitySpawnedEvent"; }

Member Data Documentation

◆ entity

Entity helios::ecs::EntitySpawnedEvent::entity