Sprite and Image now remove any masks that may have been set when they are destroyed.

This commit is contained in:
photonstorm
2014-02-21 12:18:23 +00:00
parent cf3796d60c
commit efd760479d
2 changed files with 4 additions and 10 deletions
+2 -5
View File
@@ -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;
}
+2 -5
View File
@@ -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;
};