don't register keyboard controls on top of editor controls

beta.r3js.org
-=yb4f310 2017-12-22 13:19:00 +01:00
parent b6b390315f
commit ff68ee618f
2 changed files with 3 additions and 3 deletions

View File

@ -76,7 +76,7 @@ GameLib.System.prototype.createInstance = function() {
*/ */
GameLib.System.prototype.start = function() { GameLib.System.prototype.start = function() {
this.started = true; 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() { GameLib.System.prototype.stop = function() {
this.started = false; this.started = false;
console.log('stopping ' + this.name); // console.log('stopping ' + this.name);
}; };
/** /**

View File

@ -167,7 +167,7 @@ GameLib.System.Input.prototype.instanceCreated = function(data) {
} }
if (data.component instanceof GameLib.Controls.Keyboard) { 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') console.log('ignoring multiple keyboard controls')
} else { } else {
this.keyboardControls.push(data.component); this.keyboardControls.push(data.component);