ldk_ecs_component_add
Add the ECS component.
LDK_API void * ldk_ecs_component_add(
LDKEntity entity,
u32 component_type,
const void *initial_value
);
Parameters
LDKEntity entity
- Entity to inspect or modify.
u32 component_type
- Registered ECS component type identifier.
const void *initial_value
- Initial value used by this operation.
Returns
Pointer to the requested object or data; NULL when unavailable.
ldk_ecs_component_enabled_set
Enable or disable one component instance.
LDK_API bool ldk_ecs_component_enabled_set(
LDKEntity entity,
u32 component_type,
bool enabled
);
Parameters
LDKEntity entity
- Entity to inspect or modify.
u32 component_type
- Registered ECS component type identifier.
bool enabled
- Enabled used by this operation.
Returns
True if the operation succeeds; false otherwise.
ldk_ecs_component_get
Get the ECS component.
LDK_API void * ldk_ecs_component_get(
LDKEntity entity,
u32 component_type
);
Parameters
LDKEntity entity
- Entity to inspect or modify.
u32 component_type
- Registered ECS component type identifier.
Returns
Pointer to the requested object or data; NULL when unavailable.
ldk_ecs_component_get_const
Get read-only access to the ECS component.
LDK_API const void * ldk_ecs_component_get_const(
LDKEntity entity,
u32 component_type
);
Parameters
LDKEntity entity
- Entity to inspect or modify.
u32 component_type
- Registered ECS component type identifier.
Returns
Pointer to the requested object or data; NULL when unavailable.
ldk_ecs_component_is_enabled
Check whether the ECS component is enabled.
LDK_API bool ldk_ecs_component_is_enabled(
LDKEntity entity,
u32 component_type
);
Parameters
LDKEntity entity
- Entity to inspect or modify.
u32 component_type
- Registered ECS component type identifier.
Returns
True when the queried condition holds; false otherwise.
ldk_ecs_component_register
Register the ECS component.
LDK_API bool ldk_ecs_component_register(const LDKComponentDesc *desc);
Parameters
const LDKComponentDesc *desc
- Description or configuration for this operation.
Returns
True if the operation succeeds; false otherwise.
ldk_ecs_component_registry_get
Get the ECS component registry.
LDK_API LDKComponentRegistry * ldk_ecs_component_registry_get(void);
Returns
Pointer to the requested object or data; NULL when unavailable.
ldk_ecs_component_remove
Remove the ECS component.
LDK_API bool ldk_ecs_component_remove(
LDKEntity entity,
u32 component_type
);
Parameters
LDKEntity entity
- Entity to inspect or modify.
u32 component_type
- Registered ECS component type identifier.
Returns
True if the operation succeeds; false otherwise.