mirror of
https://github.com/wassname/phaser.git
synced 2026-07-18 12:30:44 +08:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user