EntityManager.addEntity

Add entity to system. Returen pointer is valid only before one from commit(), begin() or end() will be called. To save entity to further use you should save ID instead of pointer.

  1. Entity* addEntity(EntityTemplate* tmpl)
  2. Entity* addEntity(EntityTemplate* tmpl, ComponentRef[] replacement)
    struct EntityManager
    export export
    addEntity

Parameters

tmpl EntityTemplate*

pointer entity template allocated by EntityManager.

replacement ComponentRef[]

list of components references to used. Memory form list replace data from template inside new entity. Should be used only for data which vary between most entities (like 3D position etc.)

Meta