/// <summary>
/// removes the Entity from the scene and destroys all children
/// </summary>
public void destroy()
{
_isDestroyed = true;
scene.entities.remove(this);
transform.parent = null;
// destroy any children we have
for (var i = transform.childCount - 1; i >= 0; i--)
{
var child = transform.getChild(i);
child.entity.destroy();
}
}