Skip to content

Commit dbde5ee

Browse files
committed
Keyboard.js does not reflect Phaser.Key changes
Calling justPressed or justReleased on Phaser.Keyboard throws an exception. Changed to reflect new method names in Phaser.Key I imagine you'd want these methods renamed as well, but it appears to be called by a few other classes and I didn't want a huge pull-request.
1 parent c909c29 commit dbde5ee

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/input/Keyboard.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -465,7 +465,7 @@ Phaser.Keyboard.prototype = {
465465

466466
if (this._keys[keycode])
467467
{
468-
return this._keys[keycode].justPressed(duration);
468+
return this._keys[keycode].downDuration(duration);
469469
}
470470
else
471471
{
@@ -488,7 +488,7 @@ Phaser.Keyboard.prototype = {
488488

489489
if (this._keys[keycode])
490490
{
491-
return this._keys[keycode].justReleased(duration);
491+
return this._keys[keycode].upDuration(duration);
492492
}
493493
else
494494
{

0 commit comments

Comments
 (0)