Const
The Key Combo Match Event.
This event is dispatched by the Keyboard Plugin when a [Key Combo]Phaser.Input.Keyboard.KeyCombo is matched.
Listen for this event from the Key Plugin after a combo has been created:
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!');}); Copy
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!');});
The Key Combo Match Event.
This event is dispatched by the Keyboard Plugin when a [Key Combo]Phaser.Input.Keyboard.KeyCombo is matched.
Listen for this event from the Key Plugin after a combo has been created: