mirror of
https://github.com/wassname/phaser.git
synced 2026-07-19 11:26:26 +08:00
Sprite.destroy is back in business.
This commit is contained in:
@@ -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", {
|
||||
|
||||
Reference in New Issue
Block a user