dist/carrot.js
/**
     * Destroys the group and removes it entirely from the game world.
     *
     * @method Carrot.Group#destroy
     * @param {boolean} [destroyChildren=false] - If true, all the children of the sprite and their children are destroyed, too.
     */
Destroys the group and removes it entirely from the game world.
@method Carrot.Group#destroy
@param {boolean} [destroyChildren=false] - If true, all the children of the sprite and their children are destroyed, too.
Destroys the group and removes it entirely from the game world . @method Carrot . Group#destroy @param { boolean } [ destroyChildren = false ] - If true all the children of the sprite and their children are destroyed too .
destroy(destroyChildren)
    {
        for (let i = 0; i < this.children.length; i++)
        {
            let child = this.children[i];
            if (destroyChildren)
            {
                child.destroy(true);
            }
            else
            {
                this.removeChild(child);
            }
        }
        this.active = false;
        this.parent.removeChild(this);
    }
destroy ( destroyChildren ) { for ( let i = 0 ; i < this . children . length ; i ++ ) { let child = this . children [ i ] ; if ( destroyChildren ) { child . destroy ( true ) ; } else { this . removeChild ( child ) ; } } this . active = false ; this . parent . removeChild ( this ) ; }
Destroys the group and removes it entirely from the game world.
Destroys the group and removes it entirely from the game world .
// If the children of the sprite shall be destroyed, too. // If not, add them to the world container instead, so they're still updated. // Remove the group from the world container