Phaser API Documentation

  Version: 
destroy([destroyChildren], [removeFromScene])

Description:

Empties this Group of all children and removes it from the Scene.

Does not call Phaser.GameObjects.Group#removeCallback.

Children of this Group will not be removed from the Scene by calling this method unless you specify the removeFromScene parameter.

Children of this Group will also not be destroyed by calling this method unless you specify the destroyChildren parameter.

Parameters:

name type arguments Default description
destroyChildren boolean <optional> false

Also {@link Phaser.GameObjects.GameObject#destroy} each Group member.

removeFromScene boolean <optional> false

Optionally remove each Group member from the Scene.

Since: 3.0.0