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);
}
});

View File

@@ -38,7 +38,7 @@
<a-entity
id="restartButton"
bind-toggle__raycastable="isPaused || isGameOver"
bind-visible="isPaused || isGameOver"
bind__visible="isPaused || isGameOver"
mixin="gameMenuButton"
proxy-event="event: click; to: a-scene; as: gamemenurestart">
<a-entity mixin="gameMenuButtonText" text="value: RESTART SONG"></a-entity>
@@ -48,7 +48,7 @@
id="exitButton"
mixin="gameMenuButton"
bind-toggle__raycastable="isPaused || isGameOver || isVictory"
bind-visible="isPaused || isGameOver || isVictory"
bind__visible="isPaused || isGameOver || isVictory"
position="0 -0.35 0"
proxy-event="event: click; to: a-scene; as: gamemenuexit">
<a-entity mixin="gameMenuButtonText" text="value: EXIT TO MENU"></a-entity>

View File

@@ -30,7 +30,7 @@
<a-entity
id="multiplier"
mixin="scoreText"
bind__text="value: multiplierText + 'x'"
bind__text="value: score.multiplier + 'x'"
text="width: 1"
position="1.8 1.2 -4"
scale="5 5 5">