destroyEntity

ECSInterface::destroyEntity

Destroys an Entity.

Declaration

virtual void destroyEntity(Entity entity) = 0;

Parameters

Name

Type

Description

entity

Entity

The Entity to destroy.

Returns

None.

Notes

If the Entity is self-destructing, which means that this function’s parameter is the Entity’s own identifier, for example:

destroyEntity(entityID);

The rest of the script must not reference any function or variable belonging to this Entity. It is safer to return right after self-destructing:

destroyEntity(entityID);
return;