Module frame

Module frame 

Source

Structs§

Frame
Every entity has a Frame record stored in the format of: {}_frame.

Traits§

FrameConvertor

Functions§

collect
Collect an entity into any subscriber in its frames hierarchy.
create_entity_frame
Creates a new entity frame and subscribes it to the classes it collects.
pick_collected
Attempts to select a random entity of the specified class from the frame hierarchy associated with the given owner. Picking a collected entity is different from using a collected entity in that the picked entity can be selected again by other callers.
recycle
Recycle a used entity and make it available again. This is the inverse operation to use_collected.
remove_entity_frame
Removes an entity frame from the repository transaction, effectively undoing the operation performed by create_entity_frame.
use_collected
Attempts to select a random unused entity of the specified class from the frame hierarchy associated with the given owner. If available, the selected entity is marked as used and returned. The search traverses up the hierarchy until an entity is found or the root is reached. If no entity is found, None is returned. The selected entity will not be available for other use requests until it will get recycled (through a recycle call).
withdraw
Remove an entity from any collections in its frames hierarchy.