Sprite.destroy is back in business.

This commit is contained in:
photonstorm
2013-10-13 01:29:57 +01:00
parent 574f4f351b
commit e98aa205ea
5 changed files with 72 additions and 5 deletions
+10 -2
View File
@@ -197,12 +197,20 @@ Phaser.TilemapLayer.prototype = {
return;
}
this._prevX = this._dx;
this._prevY = this._dy;
this._dx = -(this._x - (this._startX * this.tileWidth));
this._dy = -(this._y - (this._startY * this.tileHeight));
this._tx = this._dx;
this._ty = this._dy;
// First let's just copy over the whole canvas, offset by the scroll difference
// Then we only need fill in the missing strip/s (could be top/bottom/left/right I guess)
// ScrollZone code might be useful here.
this.context.clearRect(0, 0, this.canvas.width, this.canvas.height);
for (var y = this._startY; y < this._startY + this._maxY; y++)
@@ -260,11 +268,11 @@ Phaser.TilemapLayer.prototype.deltaAbsY = function () {
}
Phaser.TilemapLayer.prototype.deltaX = function () {
return this._x - this._prevX;
return this._dx - this._prevX;
}
Phaser.TilemapLayer.prototype.deltaY = function () {
return this._y - this._prevY;
return this._dy - this._prevY;
}
Object.defineProperty(Phaser.TilemapLayer.prototype, "x", {