1#include <slots.h>
2#include <stdio.h>
3
4
5
6
7
8int main(int argc, char *argv[]) {
10
11
15
17
19
20
23
24
25
29
30 printf("instance engine found: %s\n", inst_engine ? "true" : "false");
31 printf("instance cockpit found: %s\n", inst_cockpit ? "true" : "false");
32 printf("instance seat found: %s\n", inst_seat ? "true" : "false");
33
34
35
36
37
38
40}
void ecs_add_id(ecs_world_t *world, ecs_entity_t entity, ecs_id_t component)
Add a (component) ID to an entity.
ecs_id_t ecs_entity_t
An entity identifier.
struct ecs_world_t ecs_world_t
A world is the container for all ECS data and supporting features.
ecs_entity_t ecs_get_target(const ecs_world_t *world, ecs_entity_t entity, ecs_entity_t rel, int32_t index)
Get the target of a relationship.
ecs_entity_t ecs_new_w_parent(ecs_world_t *world, ecs_entity_t parent, const char *name)
Create child with Parent component.
#define ecs_add_pair(world, subject, first, second)
Add a pair to an entity.
#define ecs_entity(world,...)
Shorthand for creating an entity with ecs_entity_init().
int ecs_fini(ecs_world_t *world)
Delete a world.
ecs_world_t * ecs_init_w_args(int argc, char *argv[])
Create a new world with arguments.