vecs
Fast, flexible ecs in C++ with ergonomic API
Loading...
Searching...
No Matches
vecs::EntityCommands Class Reference

Provides a deferred command interface for managing a specific entity's state within the ECS world. More...

#include <vecs.h>

Public Member Functions

template<typename... Components>
EntityCommandsinsert (Components &&... components)
 Adds a deferred command to insert components into the entity.
 
template<typename Component >
EntityCommandsremove ()
 
 operator Entity ()
 
EntityCommandsadd_child (Entity entity)
 
template<typename... Components>
EntityCommandsinsert_child (Components &&... components)
 
template<typename Func >
EntityCommandswith_children (Func &&func)
 
void despawn ()
 Adds a deferred command to despawn the entity.
 

Friends

class Commands
 

Detailed Description

Provides a deferred command interface for managing a specific entity's state within the ECS world.

This class enables deferred operations, such as inserting components or despawning an entity.

Member Function Documentation

◆ despawn()

void vecs::EntityCommands::despawn ( )

Adds a deferred command to despawn the entity.

This method queues a command that despawns the entity when executed.

◆ insert()

template<typename... Components>
EntityCommands & vecs::EntityCommands::insert ( Components &&... components)

Adds a deferred command to insert components into the entity.

This method queues a command that inserts the specified components into the entity when executed.

Template Parameters
ComponentsVariadic template for component types to insert.
Parameters
componentsThe components to insert into the entity.
Returns
Reference to the EntityCommands instance for method chaining.

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