add triggers

This commit is contained in:
MihailRis
2024-06-30 16:25:08 +03:00
parent 50c714692a
commit 5769be8ec8
15 changed files with 239 additions and 64 deletions
+3 -1
View File
@@ -81,6 +81,8 @@ namespace scripting {
bool on_entity_grounded(const Entity& entity, float force);
bool on_entity_fall(const Entity& entity);
void on_entities_update();
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);
/// @brief Called on UI view show
void on_ui_open(
@@ -115,7 +117,7 @@ namespace scripting {
const fs::path& file,
item_funcs_set& funcsset);
void load_entity_script(
void load_entity_component(
const scriptenv& env,
const EntityDef& def,
const fs::path& file);