diff --git a/src/index.html b/src/index.html index 25c982c..83a35bf 100644 --- a/src/index.html +++ b/src/index.html @@ -216,8 +216,8 @@ {% endmacro %} diff --git a/src/state/index.js b/src/state/index.js index 4c02d2b..2c0e219 100644 --- a/src/state/index.js +++ b/src/state/index.js @@ -259,8 +259,11 @@ AFRAME.registerState({ state.isPlaying = !state.menu.active && !state.isPaused && !state.isVictory && !state.isGameOver && !state.challenge.isLoading && !state.isSongLoading; - state.leftRaycasterActive = !state.isPlaying && state.activeHand === 'left' && state.inVR; - state.rightRaycasterActive = !state.isPlaying && state.activeHand === 'right' && state.inVR; + + const anyMenuOpen = state.menu.active || state.isPaused || state.isVictory || state.isGameOver; + state.leftRaycasterActive = anyMenuOpen && state.activeHand === 'left' && state.inVR; + state.rightRaycasterActive = anyMenuOpen && state.activeHand === 'right' && state.inVR; + state.multiplierText = `${state.score.multiplier}x`; } });