Module entity_command

Module entity_command 

Source
Expand description

Contains the definition of the EntityCommand trait, as well as the blanket implementation of the trait for closures.

It also contains functions that return closures for use with EntityCommands.

Enums§

EntityCommandError
An error that occurs when running an EntityCommand on a specific entity.

Traits§

EntityCommand
A command which gets executed for a given Entity.

Functions§

clear
An EntityCommand that removes all components from an entity.
clone_components
An EntityCommand that clones the specified components of an entity and inserts them into another entity.
clone_with_opt_in
An EntityCommand that clones parts of an entity onto another entity, configured through EntityClonerBuilder.
clone_with_opt_out
An EntityCommand that clones parts of an entity onto another entity, configured through EntityClonerBuilder.
despawn
An EntityCommand that despawns an entity.
insert
An EntityCommand that adds the components in a Bundle to an entity.
insert_by_id
An EntityCommand that adds a dynamic component to an entity.
insert_from_world
An EntityCommand that adds a component to an entity using the component’s FromWorld implementation.
insert_with
An EntityCommand that adds a component to an entity using some function that returns the component.
log_components
An EntityCommand that logs the components of an entity.
move_components
An EntityCommand moves the specified components of this entity into another entity.
observe
An EntityCommand that creates an Observer watching for an EntityEvent of type E whose EntityEvent::event_target targets this entity.
remove
An EntityCommand that removes the components in a Bundle from an entity.
remove_by_id
An EntityCommand that removes a dynamic component from an entity.
remove_with_requires
An EntityCommand that removes the components in a Bundle from an entity, as well as the required components for each component removed.
retain
An EntityCommand that removes all components from an entity, except for those in the given Bundle.