-
Notifications
You must be signed in to change notification settings - Fork 201
Entity management
Fedor Elizarov edited this page Feb 21, 2020
·
3 revisions
The library provides with MACROS to deal with structures that need to be available globally, and need to be created and destroyed:
entity_handler(turret, turret_new, turret_delete);
turret* turret = entity_new("turret", turret);
turret* turret = entity_get("turret");
turret* turret = entity_get_as("turret", turret);
That is, supposing you have a structure turret
with constructor turret* turret_new()
and destructor void turret_delete(turret*)