Basic update, multithreading emplate support, fixed
-Added possibility to add entity form template + components to replace template data -basic tests for new functionality -small performance improvement for events -added ComponentRef structure which contain data pointer and component ID -now events are called before entities removing
This commit is contained in:
parent
3d98b0ee5e
commit
15cd57dbcb
6 changed files with 137 additions and 20 deletions
|
|
@ -114,3 +114,14 @@ export struct EntityTemplate
|
|||
return cast(T*)(entity_data.ptr + info.tmpl_deltas[T.component_id]);
|
||||
}
|
||||
}
|
||||
|
||||
/************************************************************************************************************************
|
||||
ComponentRef contain component ID and pointer to it. It used to add component data to entity.
|
||||
*/
|
||||
export struct ComponentRef
|
||||
{
|
||||
///pointer to component
|
||||
void* ptr;
|
||||
///component index
|
||||
ushort component_id;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue