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