The Keyboard class has had a complete overhaul. Phaser.Key objects are created automatically, there are fixes against duration and keys reset properly on visibility loss.

Keyboard.removeKey has been removed. The way the new keyboard manager works means it's no longer required.
Fixes issue #462
This commit is contained in:
photonstorm
2014-02-24 15:58:02 +00:00
parent 9d9fd06392
commit d9cadc70ac
7 changed files with 191 additions and 110 deletions
+20
View File
@@ -324,6 +324,26 @@ Phaser.Utils.Debug.prototype = {
},
renderKey: function (key, x, y, color) {
if (this.context === null)
{
return;
}
color = color || 'rgb(255,255,255)';
this.start(x, y, color, 150);
this.splitline('Key:', key.keyCode, 'isDown:', key.isDown);
this.splitline('justPressed:', key.justPressed(), 'justReleased:', key.justReleased());
this.splitline('Time Down:', key.timeDown.toFixed(0), 'duration:', key.duration.toFixed(0));
this.line('Repeats: ' + key.repeats);
this.stop();
},
/**
* Render debug information about the Input object.
* @method Phaser.Utils.Debug#renderInputInfo