* 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:
photonstorm
2013-10-28 10:17:36 +00:00
parent ea651113df
commit a814cc26cc
12 changed files with 79 additions and 41 deletions
+10 -2
View File
@@ -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();