17template<
typename Base,
typename ... Components>
31 Base&
kind(entity_t phase) {
45 template <typename E, if_t<is_enum<E>::value> = 0>
48 const auto& et = enum_type<E>(this->world_v());
49 flecs::entity_t target = et.entity(phase);
50 return this->
kind(target);
57 template <
typename Phase>
152 virtual flecs::world_t* world_v()
override = 0;
156 return *
static_cast<Base*
>(
this);
void ecs_add_id(ecs_world_t *world, ecs_entity_t entity, ecs_id_t id)
Add a (component) id to an entity.
void ecs_remove_id(ecs_world_t *world, ecs_entity_t entity, ecs_id_t id)
Remove a (component) id from an entity.
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.
void(* ecs_iter_action_t)(ecs_iter_t *it)
Function prototype for iterables.
#define ecs_ftime_t
Customizable precision for scalar time values.
Use with ecs_system_init() to create or update a system.
int32_t rate
Rate at which the system should run.
void * ctx
Context to be passed to callback (as ecs_iter_t::param)
bool multi_threaded
If true, system will be ran on multiple threads.
bool immediate
If true, system will have access to the actual world.
ecs_ftime_t interval
Interval in seconds at which the system should run.
ecs_entity_t entity
Existing entity to associate with system (optional)
ecs_query_desc_t query
System query parameters.
ecs_run_action_t run
Callback that is invoked when a system is ran.
ecs_entity_t tick_source
External tick source that determines when system ticks.
System builder interface.
Base & kind(entity_t phase)
Specify in which phase the system should run.
Base & tick_source(flecs::entity_t tick_source)
Set tick source.
Base & rate(int32_t rate)
Set system rate.
Base & immediate(bool value=true)
Specify whether system should be ran in staged context.
Base & ctx(void *ptr)
Set system context.
Base & rate(const entity_t tick_source, int32_t rate)
Set system rate.
Base & run(ecs_iter_action_t action)
Set system run callback.
Base & kind()
Specify in which phase the system should run.
Base & interval(ecs_ftime_t interval)
Set system interval.
Base & tick_source()
Set tick source.
Base & multi_threaded(bool value=true)
Specify whether system can run on multiple threads.