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
|
@ -174,6 +174,11 @@ Phaser.Pointer = function (game, id) {
|
|||
* @property {Phaser.Point} positionDown - A Phaser.Point object containing the x/y values of the pointer when it was last in a down state on the display.
|
||||
*/
|
||||
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.
|
||||
|
@ -489,7 +494,9 @@ Phaser.Pointer.prototype = {
|
|||
this.withinGame = false;
|
||||
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