Demos update:

-modified texture atlas
-fixed bug with high CPU usage (use pthread instead of builtin D multithreading)
-added new graphics
-snake now render tile coresponding to body part
-snake is destroyed after collision and emit some particles
-added some functionality to vectors
-fixed documentation issue in Manager.d
This commit is contained in:
Mergul 2020-04-28 14:13:55 +02:00
parent 8381ac166b
commit 50715fbc40
6 changed files with 366 additions and 23 deletions

View file

@ -1550,10 +1550,13 @@ export struct EntityManager
}
/************************************************************************************************************************
*Allocate EntityTemplate with specifed components and returns pointer to it.
*Allocate EntityTemplate from basic Template with modifications by adding and removing some components and returns pointer to it.
*Arrays of components needen't to be checked for repeated components, as function itself check if components exist in base template.
*
*Params:
*components_ids = array of components allocated with template
*base_tmpl = template from which components sould be copied
*components_ids = array of new components to add
*remove_components_ids = array of components to remove from base template
*/
export EntityTemplate* allocateTemplate(EntityTemplate* base_tmpl,
ushort[] components_ids, ushort[] remove_components_ids = null)