Struct amethyst::ecs::world::EntitiesRes[]

pub struct EntitiesRes { /* fields omitted */ }

The entities of this ECS. This is a resource, stored in the World. If you just want to access it in your system, you can also use the Entities type def.

Please note that you should never get this mutably in a system, because it would block all the other systems.

You need to call World::maintain after creating / deleting entities with this struct.

Methods

impl EntitiesRes

Creates a new entity atomically. This will be persistent as soon as you call World::maintain.

If you want a lazy entity builder, take a look at LazyUpdate::create_entity.

In case you have access to the World, you can also use World::create_entity which creates the entity and the components immediately.

Important traits for CreateIterAtomic<'a>

Returns an iterator which creates new entities atomically. They will be persistent as soon as you call World::maintain.

Similar to the create method above this creates an entity atomically, and then returns a builder which can be used to insert components into various storages if available.

Deletes an entity atomically. The associated components will be deleted as soon as you call World::maintain.

Returns an entity with a given id. There's no guarantee for validity, meaning the entity could be not alive.

Returns true if the specified entity is alive.

Trait Implementations

impl<'a> ParJoin for &'a EntitiesRes

Create a joined parallel iterator over the contents.

impl Default for EntitiesRes

Returns the "default value" for a type. Read more

impl<'a> Join for &'a EntitiesRes

Type of joined components.

Type of joined storages.

Type of joined bit mask.

Open this join by returning the mask and the storages. Read more

Get a joined component value by a given index.

Important traits for JoinIter<J>

Create a joined iterator over the contents.

impl Debug for EntitiesRes

Formats the value using the given formatter. Read more

Auto Trait Implementations

impl Send for EntitiesRes

impl Sync for EntitiesRes