EntityManager.allocateTemplate

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.

  1. EntityTemplate* allocateTemplate(EntityID entity_id, bool fill_default)
  2. EntityTemplate* allocateTemplate(ushort[] components_ids)
  3. EntityTemplate* allocateTemplate(EntityTemplate* base_tmpl, ushort[] components_ids, ushort[] remove_components_ids)
    struct EntityManager
    export
    allocateTemplate
  4. EntityTemplate* allocateTemplate(EntityTemplate* copy_tmpl)

Parameters

base_tmpl EntityTemplate*

template from which components sould be copied

components_ids ushort[]

array of new components to add

remove_components_ids ushort[]

array of components to remove from base template

Meta