mirror of
https://github.com/wassname/phaser.git
synced 2026-07-29 11:24:31 +08:00
* Fixed issue 135 - Added typeof checks into most ArcadePhysics functions to avoid errors with zero values.
* Fixed issue 136 - distanceTo using worldX/Y instead of x/y.
This commit is contained in:
@@ -364,8 +364,16 @@ Phaser.Sprite.prototype.preUpdate = function() {
|
||||
this.renderOrderID = this.game.world.currentRenderOrderID++;
|
||||
}
|
||||
|
||||
this.prevX = this.x;
|
||||
this.prevY = this.y;
|
||||
if (this.fixedToCamera)
|
||||
{
|
||||
this.prevX = this.game.camera.view.x + this.x;
|
||||
this.prevY = this.game.camera.view.y + this.y;
|
||||
}
|
||||
else
|
||||
{
|
||||
this.prevX = this.x;
|
||||
this.prevY = this.y;
|
||||
}
|
||||
|
||||
this.updateCache();
|
||||
this.updateAnimation();
|
||||
|
||||
Reference in New Issue
Block a user