Skip to content

Commit

Permalink
Key.duration wasn't set to zero after a Key.reset (thanks @DrHackenstein
Browse files Browse the repository at this point in the history
, #932)
  • Loading branch information
photonstorm committed Jul 1, 2014
1 parent db22b01 commit 79bd7c4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ Version 2.0.6 - "Jornhill" - -in development-
* Calling reset on Sprite with a P2 body can result in body.data.world == null.
Calling addToWorld() would previously not check the _toRemove array, which could, if the timing were right, result in a Sprite being revived but then removed from the P2 World -- the result of this being the Sprites data would be in a mixed state causing it to appear visually but not function in the world (thanks @jonkelling, fix #917 #925)
* Input.SinglePad was fixed so that the rawpad button array supports Windows and Linux (thank @renatodarrigo, fix #958)
* Key.duration wasn't set to zero after a Key.reset (thanks @DrHackenstein, #932)


### ToDo
Expand Down
2 changes: 1 addition & 1 deletion src/input/Key.js
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ Phaser.Key.prototype = {
this.isDown = false;
this.isUp = true;
this.timeUp = this.game.time.now;
this.duration = this.game.time.now - this.timeDown;
this.duration = 0;
this.enabled = true;

if (hard)
Expand Down

0 comments on commit 79bd7c4

Please sign in to comment.