Fixed some issues in dragging sprites with snap-to-center and world coordinates.

This commit is contained in:
Richard Davey
2013-08-07 00:00:12 +01:00
parent 77cc3858d9
commit d7205992a5
60 changed files with 1080 additions and 730 deletions
-16
View File
@@ -950,22 +950,6 @@ module Phaser {
return camera.worldView.y + this.y;
}
/**
* @param {Number} x
* @param {Number} y
* @param {String} [color]
*/
public renderDebugInfo(x: number, y: number, color?: string = 'rgb(255,255,255)') {
this.game.stage.context.fillStyle = color;
this.game.stage.context.fillText('Input', x, y);
this.game.stage.context.fillText('X: ' + this.x + ' Y: ' + this.y, x, y + 14);
this.game.stage.context.fillText('World X: ' + this.getWorldX() + ' World Y: ' + this.getWorldY(), x, y + 28);
this.game.stage.context.fillText('Scale X: ' + this.scale.x.toFixed(1) + ' Scale Y: ' + this.scale.x.toFixed(1), x, y + 42);
this.game.stage.context.fillText('Screen X: ' + this.activePointer.screenX + ' Screen Y: ' + this.activePointer.screenY, x, y + 56);
}
/**
* Get the distance between two Pointer objects
* @method getDistance