Skip to content

Commit a23c6ee

Browse files
committed
Added positionUp to Pointer
1 parent 3f8911d commit a23c6ee

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

src/input/Pointer.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,11 @@ Phaser.Pointer = function (game, id) {
174174
* @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.
175175
*/
176176
this.positionDown = new Phaser.Point();
177+
178+
/**
179+
* @property {Phaser.Point} positionUp - A Phaser.Point object containing the x/y values of the pointer when it was last released.
180+
*/
181+
this.positionUp = new Phaser.Point();
177182

178183
/**
179184
* 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 = {
489494
this.withinGame = false;
490495
this.isDown = false;
491496
this.isUp = true;
492-
497+
498+
this.positionUp.setTo(this.x, this.y);
499+
493500
if (this.isMouse === false)
494501
{
495502
this.game.input.currentPointers--;

0 commit comments

Comments
 (0)