The Key.reset method no longer resets the Key.enabled or Key.preventDefault booleans back to true again, but only resets the state of the Key. Fix #6098

This commit is contained in:
Richard Davey 2022-05-06 15:12:27 +01:00
parent 0545373587
commit 6d9aceb727

View file

@ -325,6 +325,8 @@ var Key = new Class({
/**
* Resets this Key object back to its default un-pressed state.
*
* As of version 3.60.0 it no longer resets the `enabled` or `preventDefault` flags.
*
* @method Phaser.Input.Keyboard.Key#reset
* @since 3.6.0
*
@ -332,8 +334,6 @@ var Key = new Class({
*/
reset: function ()
{
this.preventDefault = true;
this.enabled = true;
this.isDown = false;
this.isUp = true;
this.altKey = false;