mirror of
https://github.com/photonstorm/phaser
synced 2024-11-24 05:33:35 +00:00
Merge pull request #676 from Cryszon/pointerPositionUp
Added positionUp to Pointer
This commit is contained in:
commit
9a663d0d78
1 changed files with 8 additions and 1 deletions
|
@ -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--;
|
||||
|
|
Loading…
Reference in a new issue