Phaser API Documentation

  Version: 
This is a beta release of our new docs system. Found an issue?
Please tell us about it in the #📖-newdocs-feedback channel on the Phaser Discord
Event: DESTROY
Phaser.GameObjects.Events.DESTROY
DESTROY

Description:

The Game Object Destroy Event.

This event is dispatched when a Game Object instance is being destroyed.

Listen for it on a Game Object instance using GameObject.on('destroy', listener).

Parameters:

name type description
gameObject Phaser.GameObjects.GameObject

The Game Object which is being destroyed.

Since: 3.0.0