Helios Engine
A modular ECS based data-oriented C++23 game engine framework
Loading...
Searching...
No Matches
helios::ecs::TryDestroyEntityCmd Class Reference

Command to try destroy a single entity. More...

#include <builtin_commands.hpp>

Public Member Functions

constexpr TryDestroyEntityCmd (Entity entity) noexcept
 Constructs try destroy entity command.
constexpr TryDestroyEntityCmd (const TryDestroyEntityCmd &) noexcept=default
constexpr TryDestroyEntityCmd (TryDestroyEntityCmd &&) noexcept=default
constexpr ~TryDestroyEntityCmd () noexcept=default
constexpr TryDestroyEntityCmdoperator= (const TryDestroyEntityCmd &) noexcept=default
constexpr TryDestroyEntityCmdoperator= (TryDestroyEntityCmd &&) noexcept=default
void Execute (World &world)
 Executes entity destruction if it exists.

Detailed Description

Command to try destroy a single entity.

Will destroy the entity only if it exists in the world.

Definition at line 158 of file builtin_commands.hpp.

Constructor & Destructor Documentation

◆ TryDestroyEntityCmd() [1/3]

helios::ecs::TryDestroyEntityCmd::TryDestroyEntityCmd ( Entity entity)
inlineexplicitconstexprnoexcept

Constructs try destroy entity command.

Warning
Triggers assertion if entity is invalid.
Parameters
entityEntity to destroy

Definition at line 165 of file builtin_commands.hpp.

◆ TryDestroyEntityCmd() [2/3]

helios::ecs::TryDestroyEntityCmd::TryDestroyEntityCmd ( const TryDestroyEntityCmd & )
constexprdefaultnoexcept

◆ TryDestroyEntityCmd() [3/3]

helios::ecs::TryDestroyEntityCmd::TryDestroyEntityCmd ( TryDestroyEntityCmd && )
constexprdefaultnoexcept

◆ ~TryDestroyEntityCmd()

helios::ecs::TryDestroyEntityCmd::~TryDestroyEntityCmd ( )
constexprdefaultnoexcept

Member Function Documentation

◆ Execute()

void helios::ecs::TryDestroyEntityCmd::Execute ( World & world)
inline

Executes entity destruction if it exists.

Parameters
worldWorld to remove entity from

Definition at line 183 of file builtin_commands.hpp.

◆ operator=() [1/2]

TryDestroyEntityCmd & helios::ecs::TryDestroyEntityCmd::operator= ( const TryDestroyEntityCmd & )
constexprdefaultnoexcept

◆ operator=() [2/2]

TryDestroyEntityCmd & helios::ecs::TryDestroyEntityCmd::operator= ( TryDestroyEntityCmd && )
constexprdefaultnoexcept