fix game menu button binds

This commit is contained in:
Kevin Ngo
2018-10-17 03:10:37 -07:00
parent ca78138e64
commit c85e570b9d
3 changed files with 9 additions and 6 deletions

View File

@@ -5,8 +5,11 @@ AFRAME.registerComponent('debug-state', {
play: function () {
const flags = AFRAME.utils.getUrlParameter('debugstate').trim();
if (!flags) { return; }
flags.split(',').forEach(flag => {
this.el.sceneEl.emit(`debug${flag.trim()}`, null, false);
});
setTimeout(() => {
flags.split(',').forEach(flag => {
this.el.sceneEl.emit(`debug${flag.trim()}`, null, false);
});
}, 500);
}
});