Skip to content

Commit 79bd7c4

Browse files
committed
Key.duration wasn't set to zero after a Key.reset (thanks @DrHackenstein, phaserjs#932)
1 parent db22b01 commit 79bd7c4

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,7 @@ Version 2.0.6 - "Jornhill" - -in development-
143143
* Calling reset on Sprite with a P2 body can result in body.data.world == null.
144144
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)
145145
* Input.SinglePad was fixed so that the rawpad button array supports Windows and Linux (thank @renatodarrigo, fix #958)
146+
* Key.duration wasn't set to zero after a Key.reset (thanks @DrHackenstein, #932)
146147

147148

148149
### ToDo

src/input/Key.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ Phaser.Key.prototype = {
202202
this.isDown = false;
203203
this.isUp = true;
204204
this.timeUp = this.game.time.now;
205-
this.duration = this.game.time.now - this.timeDown;
205+
this.duration = 0;
206206
this.enabled = true;
207207

208208
if (hard)

0 commit comments

Comments
 (0)