From ff68ee618f09bac943a612ef206fa66cff29ab35 Mon Sep 17 00:00:00 2001 From: -=yb4f310 Date: Fri, 22 Dec 2017 13:19:00 +0100 Subject: [PATCH] don't register keyboard controls on top of editor controls --- src/game-lib-system-0.js | 4 ++-- src/game-lib-system-input.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/game-lib-system-0.js b/src/game-lib-system-0.js index 3220712..ce65f09 100644 --- a/src/game-lib-system-0.js +++ b/src/game-lib-system-0.js @@ -76,7 +76,7 @@ GameLib.System.prototype.createInstance = function() { */ GameLib.System.prototype.start = function() { this.started = true; - console.log('starting ' + this.name); +// console.log('starting ' + this.name); }; /** @@ -85,7 +85,7 @@ GameLib.System.prototype.start = function() { */ GameLib.System.prototype.stop = function() { this.started = false; - console.log('stopping ' + this.name); +// console.log('stopping ' + this.name); }; /** diff --git a/src/game-lib-system-input.js b/src/game-lib-system-input.js index f7df3cf..9e4a680 100644 --- a/src/game-lib-system-input.js +++ b/src/game-lib-system-input.js @@ -167,7 +167,7 @@ GameLib.System.Input.prototype.instanceCreated = function(data) { } if (data.component instanceof GameLib.Controls.Keyboard) { - if (this.keyboardControls.length > 0) { + if (this.keyboardControls.length > 0 || this.editorControls.length > 0) { console.log('ignoring multiple keyboard controls') } else { this.keyboardControls.push(data.component);