mirror of
https://github.com/wassname/phaser.git
synced 2026-07-01 16:50:43 +08:00
Sprite and Image now remove any masks that may have been set when they are destroyed.
This commit is contained in:
@@ -369,11 +369,6 @@ Phaser.Image.prototype.kill = function() {
|
||||
*/
|
||||
Phaser.Image.prototype.destroy = function() {
|
||||
|
||||
if (this.filters)
|
||||
{
|
||||
this.filters = null;
|
||||
}
|
||||
|
||||
if (this.parent)
|
||||
{
|
||||
this.parent.remove(this);
|
||||
@@ -393,6 +388,8 @@ Phaser.Image.prototype.destroy = function() {
|
||||
this.exists = false;
|
||||
this.visible = false;
|
||||
|
||||
this.filters = null;
|
||||
this.mask = null;
|
||||
this.game = null;
|
||||
|
||||
}
|
||||
|
||||
@@ -491,11 +491,6 @@ Phaser.Sprite.prototype.kill = function() {
|
||||
*/
|
||||
Phaser.Sprite.prototype.destroy = function() {
|
||||
|
||||
if (this.filters)
|
||||
{
|
||||
this.filters = null;
|
||||
}
|
||||
|
||||
if (this.parent)
|
||||
{
|
||||
this.parent.remove(this);
|
||||
@@ -525,6 +520,8 @@ Phaser.Sprite.prototype.destroy = function() {
|
||||
this.exists = false;
|
||||
this.visible = false;
|
||||
|
||||
this.filters = null;
|
||||
this.mask = null;
|
||||
this.game = null;
|
||||
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user