Adding the key capture to addCursors.

This commit is contained in:
photonstorm
2013-10-25 19:13:00 +01:00
parent 6994e4be5e
commit b6efdff286
2 changed files with 5 additions and 2 deletions
+2 -2
View File
@@ -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('-');
+3
View File
@@ -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];
},