LDKEntityIterFn
Callback visiting an entity during iteration.
typedef bool(*LDKEntityIterFn)(LDKEntity entity, LDKEntityInfo *info, void *user);
Parameters
entity
- Entity to inspect or modify.
info
- Info used by this operation.
user
- Opaque caller-supplied data passed to the callback.
Returns
True if the operation succeeds; false otherwise.
LDKEntityIterator
typedef struct LDKEntityIterator{
LDKEntityRegistry *registry;
XHPoolIter iter;
LDKEntity current;
u8 has_current;
}LDKEntityIterator;
ldk_entity_foreach
Visit each living entity using a callback.
LDK_API void ldk_entity_foreach(
LDKEntityRegistry *system,
LDKEntityIterFn fn,
void *user
);
Parameters
LDKEntityRegistry *system
- System used by this operation.
LDKEntityIterFn fn
- Callback invoked by this operation.
void *user
- Opaque caller-supplied data passed to the callback.
ldk_entity_iterator_begin
Begin the entity iterator.
LDK_API LDKEntityIterator ldk_entity_iterator_begin(LDKEntityRegistry *registry);
Returns
The requested value.
ldk_entity_iterator_end
Finish the entity iterator.
LDK_API void ldk_entity_iterator_end(LDKEntityIterator *iterator);
ldk_entity_iterator_next
Advance an entity iterator to the next entity.
LDK_API bool ldk_entity_iterator_next(
LDKEntityIterator *iterator,
LDKEntity *out_entity
);
Returns
True if the operation succeeds; false otherwise.