Skip to content

Commit 6efb88b

Browse files
authored
Merge pull request phaserjs#3900 from thejonanshow/upgrade_konami_code
Correct Konami code in createCombo documentation.
2 parents 817dd94 + 7c525b0 commit 6efb88b

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

src/input/keyboard/KeyboardPlugin.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -450,11 +450,11 @@ var KeyboardPlugin = new Class({
450450
* An array of either integers (key codes) or strings, or a mixture of both
451451
* An array of objects (such as Key objects) with a public 'keyCode' property
452452
*
453-
* For example, to listen for the Konami code (up, up, up, down, down, down, left, left, left, right, right, right)
453+
* For example, to listen for the Konami code (up, up, down, down, left, right, left, right, b, a, enter)
454454
* you could pass the following array of key codes:
455455
*
456456
* ```javascript
457-
* this.input.keyboard.createCombo([ 38, 38, 38, 40, 40, 40, 37, 37, 37, 39, 39, 39 ], { resetOnMatch: true });
457+
* this.input.keyboard.createCombo([ 38, 38, 40, 40, 37, 39, 37, 39, 66, 65, 13 ], { resetOnMatch: true });
458458
*
459459
* this.input.keyboard.on('keycombomatch', function (event) {
460460
* console.log('Konami Code entered!');

src/input/keyboard/combo/KeyCombo.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,11 @@ var ResetKeyCombo = require('./ResetKeyCombo');
3535
* An array of either integers (key codes) or strings, or a mixture of both
3636
* An array of objects (such as Key objects) with a public 'keyCode' property
3737
*
38-
* For example, to listen for the Konami code (up, up, up, down, down, down, left, left, left, right, right, right)
38+
* For example, to listen for the Konami code (up, up, down, down, left, right, left, right, b, a, enter)
3939
* you could pass the following array of key codes:
4040
*
4141
* ```javascript
42-
* this.input.keyboard.createCombo([ 38, 38, 38, 40, 40, 40, 37, 37, 37, 39, 39, 39 ], { resetOnMatch: true });
42+
* this.input.keyboard.createCombo([ 38, 38, 40, 40, 37, 39, 37, 39, 66, 65, 13 ], { resetOnMatch: true });
4343
*
4444
* this.input.keyboard.on('keycombomatch', function (event) {
4545
* console.log('Konami Code entered!');

0 commit comments

Comments
 (0)