mirror of
https://github.com/wassname/phaser.git
synced 2026-07-04 17:20:31 +08:00
Adding the key capture to addCursors.
This commit is contained in:
+2
-2
@@ -308,11 +308,11 @@ Phaser.Game.prototype = {
|
||||
|
||||
if (this.renderType == Phaser.CANVAS)
|
||||
{
|
||||
console.log('%cPhaser ' + Phaser.VERSION + ' initialized. Rendering to Canvas', 'color: #ffff33; background: #000000');
|
||||
console.log('%cPhaser initialized. Rendering to Canvas.', 'color: #ffff33; background: #000000');
|
||||
}
|
||||
else
|
||||
{
|
||||
console.log('%cPhaser ' + Phaser.VERSION + ' initialized. Rendering to WebGL', 'color: #ffff33; background: #000000');
|
||||
console.log('%cPhaser initialized. Rendering to WebGL.', 'color: #ffff33; background: #000000');
|
||||
}
|
||||
|
||||
var pos = Phaser.VERSION.indexOf('-');
|
||||
|
||||
@@ -107,6 +107,9 @@ Phaser.Keyboard.prototype = {
|
||||
addKey: function (keycode) {
|
||||
|
||||
this._hotkeys[keycode] = new Phaser.Key(this.game, keycode);
|
||||
|
||||
this.addKeyCapture(keycode);
|
||||
|
||||
return this._hotkeys[keycode];
|
||||
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user