Phaser API Documentation



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).


name type description
gameObject Phaser.GameObjects.GameObject

The Game Object which is being destroyed.

fromScene boolean

True if this Game Object is being destroyed by the Scene, false if not.

Since: 3.0.0