Skip to main content

DespawnCommand Class

Command to request despawning of a GameObject. More...

Declaration

class helios::engine::runtime::spawn::commands::DespawnCommand { ... }

Public Constructors Index

DespawnCommand (const helios::engine::ecs::EntityHandle entityHandle, const helios::engine::runtime::spawn::types::SpawnProfileId spawnProfileId)

Constructs a DespawnCommand with a target profile. More...

Public Member Functions Index

helios::engine::ecs::EntityHandleentityHandle () const noexcept

Returns the handle of the entity to despawn. More...

helios::engine::runtime::spawn::types::SpawnProfileIdspawnProfileId () const noexcept

Returns the spawn profile ID for pool return. More...

Private Member Attributes Index

helios::engine::ecs::EntityHandleentityHandle_

The handle of the entity to despawn. More...

helios::engine::runtime::spawn::types::SpawnProfileIdspawnProfileId_

The spawn profile ID for pool return. More...

Description

Command to request despawning of a GameObject.

DespawnCommand is a WorldCommand that requests the deactivation and return of a GameObject to its pool. The command identifies the target entity by its handle and specifies the spawn profile for pool return.

The command is dispatched to a DespawnCommandDispatcher which forwards it to the appropriate SpawnManager for deferred processing.

See Also

SpawnCommand

See Also

DespawnCommandDispatcher

See Also

SpawnManager

Definition at line 35 of file DespawnCommand.ixx.

Public Constructors

DespawnCommand()

helios::engine::runtime::spawn::commands::DespawnCommand::DespawnCommand (const helios::engine::ecs::EntityHandle entityHandle, const helios::engine::runtime::spawn::types::SpawnProfileId spawnProfileId)
inline explicit

Constructs a DespawnCommand with a target profile.

Parameters
entityHandle

The handle of the entity to despawn.

spawnProfileId

The spawn profile ID for pool return.

Definition at line 55 of file DespawnCommand.ixx.

References entityHandle and spawnProfileId.

Public Member Functions

entityHandle()

helios::engine::ecs::EntityHandle helios::engine::runtime::spawn::commands::DespawnCommand::entityHandle ()
inline nodiscard noexcept

Returns the handle of the entity to despawn.

Returns

The entity handle.

Definition at line 66 of file DespawnCommand.ixx.

66 [[nodiscard]] helios::engine::ecs::EntityHandle entityHandle() const noexcept {
67 return entityHandle_;
68 }

Referenced by DespawnCommand.

spawnProfileId()

helios::engine::runtime::spawn::types::SpawnProfileId helios::engine::runtime::spawn::commands::DespawnCommand::spawnProfileId ()
inline nodiscard noexcept

Returns the spawn profile ID for pool return.

Returns

The spawn profile ID associated with this command.

Definition at line 75 of file DespawnCommand.ixx.

76 return spawnProfileId_;
77 }

Referenced by DespawnCommand.

Private Member Attributes

entityHandle_

helios::engine::ecs::EntityHandle helios::engine::runtime::spawn::commands::DespawnCommand::entityHandle_

The handle of the entity to despawn.

Definition at line 40 of file DespawnCommand.ixx.

spawnProfileId_

helios::engine::runtime::spawn::types::SpawnProfileId helios::engine::runtime::spawn::commands::DespawnCommand::spawnProfileId_

The spawn profile ID for pool return.

Definition at line 45 of file DespawnCommand.ixx.


The documentation for this class was generated from the following file:


Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.15.0.