| Top |
| LeecsWorld * | leecs_world_new () |
| void | leecs_world_free () |
| LeecsWorld * | leecs_world_copy () |
| const LeecsRegistry * | leecs_world_get_registry () |
LeecsWorld stores and manages information about entities, including their components and the template they were created from, if any. This amounts to managing the game state.
Each LeecsWorld is tied to a LeecsRegistry, which stores metadata for use in a LeecsWorld, most important being a list of existing components which can then be added to entities in the LeecsWorld.
LeecsWorld *
leecs_world_new (LeecsRegistry *registry);
Creates a new empty LeecsWorld and increments the reference counter of
registry
.
void
leecs_world_free (LeecsWorld *world);
Frees all memory associated with world
and decrements the reference counter
of the LeecsRegistry used in world
.
LeecsWorld *
leecs_world_copy (const LeecsWorld *world);
Creates a copy of world
and increments the reference counter of the
LeecsRegistry used in world
.
const LeecsRegistry *
leecs_world_get_registry (const LeecsWorld *world);
Gets a reference to the LeecsRegistry used in world
.