Merge pull request #3900 from thejonanshow/upgrade_konami_code

Correct Konami code in createCombo documentation.
This commit is contained in:
Richard Davey 2018-08-20 18:30:18 +01:00 committed by GitHub
commit 6efb88b24b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View file

@ -450,11 +450,11 @@ var KeyboardPlugin = new Class({
* An array of either integers (key codes) or strings, or a mixture of both
* An array of objects (such as Key objects) with a public 'keyCode' property
*
* For example, to listen for the Konami code (up, up, up, down, down, down, left, left, left, right, right, right)
* For example, to listen for the Konami code (up, up, down, down, left, right, left, right, b, a, enter)
* you could pass the following array of key codes:
*
* ```javascript
* this.input.keyboard.createCombo([ 38, 38, 38, 40, 40, 40, 37, 37, 37, 39, 39, 39 ], { resetOnMatch: true });
* this.input.keyboard.createCombo([ 38, 38, 40, 40, 37, 39, 37, 39, 66, 65, 13 ], { resetOnMatch: true });
*
* this.input.keyboard.on('keycombomatch', function (event) {
* console.log('Konami Code entered!');

View file

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