mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-08 04:21:50 +00:00
add entity 'on_render' event
This commit is contained in:
parent
d099b294a2
commit
0d230f2449
5 changed files with 32 additions and 8 deletions
|
|
@ -422,6 +422,13 @@ void scripting::on_entities_update() {
|
|||
lua::pop(L);
|
||||
}
|
||||
|
||||
void scripting::on_entities_render() {
|
||||
auto L = lua::get_main_thread();
|
||||
lua::get_from(L, STDCOMP, "render", true);
|
||||
lua::call_nothrow(L, 0, 0);
|
||||
lua::pop(L);
|
||||
}
|
||||
|
||||
void scripting::on_ui_open(
|
||||
UiDocument* layout,
|
||||
std::vector<dynamic::Value> args
|
||||
|
|
|
|||
|
|
@ -89,6 +89,7 @@ namespace scripting {
|
|||
bool on_entity_fall(const Entity& entity);
|
||||
bool on_entity_save(const Entity& entity);
|
||||
void on_entities_update();
|
||||
void on_entities_render();
|
||||
void on_trigger_enter(const Entity& entity, size_t index, entityid_t oid);
|
||||
void on_trigger_exit(const Entity& entity, size_t index, entityid_t oid);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue