-LinearLayout proggress:
*EntityTemplate.getComponent *Adding/removing components for Entitites -better code for adding components
This commit is contained in:
parent
cb9bac5dde
commit
c18ac54265
4 changed files with 95 additions and 40 deletions
|
|
@ -45,6 +45,7 @@ export struct EntityTemplate
|
|||
|
||||
T* getComponent(T)()
|
||||
{
|
||||
return cast(T*)(entity_data.ptr + info.deltas[T.component_id]);
|
||||
version(LinearLayout)return cast(T*)(entity_data.ptr + info.tmpl_deltas[T.component_id]);
|
||||
else return cast(T*)(entity_data.ptr + info.deltas[T.component_id]);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue