Merge pull request #676 from Cryszon/pointerPositionUp

Added positionUp to Pointer
This commit is contained in:
Richard Davey 2014-04-01 00:28:08 +01:00
commit 9a663d0d78

View file

@ -175,6 +175,11 @@ Phaser.Pointer = function (game, id) {
*/
this.positionDown = new Phaser.Point();
/**
* @property {Phaser.Point} positionUp - A Phaser.Point object containing the x/y values of the pointer when it was last released.
*/
this.positionUp = new Phaser.Point();
/**
* A Phaser.Circle that is centered on the x/y coordinates of this pointer, useful for hit detection.
* The Circle size is 44px (Apples recommended "finger tip" size).
@ -490,6 +495,8 @@ Phaser.Pointer.prototype = {
this.isDown = false;
this.isUp = true;
this.positionUp.setTo(this.x, this.y);
if (this.isMouse === false)
{
this.game.input.currentPointers--;