mirror of
https://github.com/photonstorm/phaser
synced 2024-11-27 07:01:20 +00:00
Merge pull request #3900 from thejonanshow/upgrade_konami_code
Correct Konami code in createCombo documentation.
This commit is contained in:
commit
6efb88b24b
2 changed files with 4 additions and 4 deletions
|
@ -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!');
|
||||
|
|
|
@ -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!');
|
||||
|
|
Loading…
Reference in a new issue