Lua
Events
Functions | Description |
trigger an event with the c++ dispatcher |
Entity Registry
Functions | Description |
create an entity. | |
destroy an entity | |
get the numbers of entities | |
checks whether the requested component is associated with the given entity | |
Events API Documentation
shiva.dispatcher:trigger_[event_name]_event
This function trigger an event using the EnTT dispatcher.
All those functions are automatically generated based on shiva::event.
Parameters
Name | Description |
evt_arg | type -> constructor of the current_event |
Example
Entity Registry API Documentation
shiva.entity_registry:create
This function create an entity through the EnTT registry and return an unique identifier.
Return value
Possible name | Description |
entity_id |
|
Example
shiva.entity_registry:destroy
This function destroy an entity through the EnTT registry.
Parameters
Name | Description |
entity_id |
|
Example
shiva.entity_registry:nb_entities
This function retrieve the number of entities through the EnTT registry
Return value
Possible name | Description |
nb_entities |
|
Example
shiva.entityregistry:has_[component_name]_component
This function checks whether the requested component is associated with the given entity through the EnTT registry
All those functions are automatically generated based on the common components.
Parameters
Name | Description |
entity_id |
|
Return value
Possible name | Description |
result |
|
Example
Last updated