1#include <time_interval.h>
2#include <stdio.h>
3
4
5
8}
9
10int main(int argc, char *argv[]) {
12
13
17 .callback = Tick,
18 .interval = 1.0
19 });
20
22 .entity =
ecs_entity(ecs, { .name =
"FastTick" }),
24 .callback = Tick,
25 .interval = 0.5
26 });
27
28
30
32
34
35
36
37
38
39
40
41
42
43
44
45
46
47}
FLECS_API void ecs_set_target_fps(ecs_world_t *world, ecs_ftime_t fps)
Set target frames per second (FPS) for an application.
FLECS_API bool ecs_progress(ecs_world_t *world, ecs_ftime_t delta_time)
Progress a world.
#define ecs_system(world,...)
Shorthand for creating a system with ecs_system_init().
struct ecs_world_t ecs_world_t
A world is the container for all ECS data and supporting features.
#define ecs_entity(world,...)
Shorthand for creating an entity with ecs_entity_init().
const char * ecs_get_name(const ecs_world_t *world, ecs_entity_t entity)
Get the name of an entity.
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.
ecs_entity_t system
The system (if applicable).