mirror of
https://github.com/wassname/phaser.git
synced 2026-07-25 13:20:14 +08:00
* When a Sprite is destroyed any active filters are removed as well.
* Updated Pixi.js so that removing filters now works correctly without breaking the display list.
This commit is contained in:
@@ -840,6 +840,11 @@ Phaser.Sprite.prototype.kill = function() {
|
||||
*/
|
||||
Phaser.Sprite.prototype.destroy = function() {
|
||||
|
||||
if (this.filters)
|
||||
{
|
||||
this.filters = null;
|
||||
}
|
||||
|
||||
if (this.group)
|
||||
{
|
||||
this.group.remove(this);
|
||||
@@ -860,13 +865,6 @@ Phaser.Sprite.prototype.destroy = function() {
|
||||
this.animations.destroy();
|
||||
}
|
||||
|
||||
if (this._filters)
|
||||
{
|
||||
console.log('removeFilter', this._filters);
|
||||
this.removeFilter(this._filters);
|
||||
console.log(this._filters);
|
||||
}
|
||||
|
||||
this.alive = false;
|
||||
this.exists = false;
|
||||
this.visible = false;
|
||||
|
||||
Reference in New Issue
Block a user