mirror of
https://github.com/wassname/phaser.git
synced 2026-08-20 12:40:12 +08:00
Fixed some issues in dragging sprites with snap-to-center and world coordinates.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user