Added preDestroy handler

This commit is contained in:
Richard Davey 2020-01-24 18:03:18 +00:00
parent bf65d6b577
commit 5022830c7a

View file

@ -901,6 +901,26 @@ var Rope = new Class({
return this;
},
/**
* Handles the pre-destroy step for the Rope, which removes the Animation component and typed arrays.
*
* @method Phaser.GameObjects.Rope#preDestroy
* @private
* @since 3.23.0
*/
preDestroy: function ()
{
this.anims.destroy();
this.anims = undefined;
this.points = null;
this.vertices = null;
this.uv = null;
this.colors = null;
this.alphas = null;
},
/**
* The horizontally flipped state of the Game Object.
*