![]() |
Flecs v4.1
A fast entity component system (ECS) for C & C++
|
Used with ecs_function_init and ecs_method_init. More...
#include <script.h>
Public Attributes | |
| const char * | name |
| Function name. | |
| ecs_entity_t | parent |
| Parent of function. | |
| ecs_script_parameter_t | params [(16)] |
| Function parameters. | |
| ecs_entity_t | return_type |
| Function return type. | |
| ecs_function_callback_t | callback |
| Function implementation. | |
| ecs_vector_function_callback_t | vector_callbacks [(18)] |
| Vector function implementations. | |
| void * | ctx |
| Context passed to function implementation. | |
| ecs_function_callback_t ecs_function_desc_t::callback |
| void* ecs_function_desc_t::ctx |
| ecs_script_parameter_t ecs_function_desc_t::params[(16)] |
| ecs_entity_t ecs_function_desc_t::parent |
| ecs_entity_t ecs_function_desc_t::return_type |
| ecs_vector_function_callback_t ecs_function_desc_t::vector_callbacks[(18)] |
Vector function implementations.
Set these callbacks if a function has one or more arguments of type flecs.script vector, and optionally a return type of flecs.script.vector.
The flecs.script.vector type allows a function to be called with types that meet the following constraints:
This allows for statements like:
which would otherwise have to be written out as:
To register vector functions, do: