[−][src]Type Definition specs::prelude::Entities
type Entities<'a> = Read<'a, EntitiesRes>;
A wrapper for a read Entities
resource.
Note that this is just Read<Entities>
, so
you can easily use it in your system:
type SystemData = (Entities<'a> /* ... */,);
Please note that you should call World::maintain
after creating / deleting entities with this resource.
When .join
ing on Entities
, you will need to do it like this:
use specs::prelude::*; for (e, pos) in (&entities, &positions).join() { // Do something }