/// <summary> /// Frees an entity back to the agent's pool of available entities. /// Destroying an entity will also destroy any components attached to it. /// </summary> /// <param name="entity">The entity to destroy/free.</param> public void DestroyEntity(EcsEntity entity) { _componentGateway.EntityDestroyed(entity); _systemGateway.EntityDestroyed(entity); _entityGateway.DestroyEntity(entity); }