The KeyboardManager and KeyboardPlugin were both still checking for the InputManager.useQueue property, which was removed several versions ago.

This commit is contained in:
Richard Davey 2020-08-01 20:54:45 +01:00
parent 4f2aedb474
commit c4000843ec
2 changed files with 41 additions and 58 deletions

View file

@ -193,10 +193,7 @@ var KeyboardManager = new Class({
_this.queue.push(event);
if (!_this.manager.useQueue)
{
_this.manager.events.emit(InputEvents.MANAGER_PROCESS);
}
var modified = (event.altKey || event.ctrlKey || event.shiftKey || event.metaKey);
@ -216,10 +213,7 @@ var KeyboardManager = new Class({
_this.queue.push(event);
if (!_this.manager.useQueue)
{
_this.manager.events.emit(InputEvents.MANAGER_PROCESS);
}
var modified = (event.altKey || event.ctrlKey || event.shiftKey || event.metaKey);

View file

@ -146,6 +146,9 @@ var KeyboardPlugin = new Class({
*/
this.combos = [];
this.prevCode = 0;
this.prevTime = 0;
sceneInputPlugin.pluginEvents.once(InputEvents.BOOT, this.boot, this);
sceneInputPlugin.pluginEvents.on(InputEvents.START, this.start, this);
},
@ -184,15 +187,8 @@ var KeyboardPlugin = new Class({
* @since 3.10.0
*/
start: function ()
{
if (this.sceneInputPlugin.manager.useQueue)
{
this.sceneInputPlugin.pluginEvents.on(InputEvents.UPDATE, this.update, this);
}
else
{
this.sceneInputPlugin.manager.events.on(InputEvents.MANAGER_PROCESS, this.update, this);
}
this.sceneInputPlugin.pluginEvents.once(InputEvents.SHUTDOWN, this.shutdown, this);
@ -826,14 +822,7 @@ var KeyboardPlugin = new Class({
{
this.resetKeys();
if (this.sceneInputPlugin.manager.useQueue)
{
this.sceneInputPlugin.pluginEvents.off(InputEvents.UPDATE, this.update, this);
}
else
{
this.sceneInputPlugin.manager.events.off(InputEvents.MANAGER_PROCESS, this.update, this);
}
this.game.events.off(GameEvents.BLUR, this.resetKeys);