leaderboard fixes:

leaderboard reveal only after text counter done

fix leaderboard clearing exiting song

no flash leaderboard between menu select songs

hide leaderboard in genre
This commit is contained in:
Kevin Ngo
2018-11-20 03:44:21 -08:00
parent a2288eaee1
commit f1b8f85fbe
4 changed files with 11 additions and 11 deletions

View File

@@ -55,11 +55,12 @@ AFRAME.registerComponent('leaderboard', {
this.checkLeaderboardQualify();
}
if (oldData.menuSelectedChallengeId !== this.data.menuSelectedChallengeId) {
if (this.data.menuSelectedChallengeId &&
oldData.menuSelectedChallengeId !== this.data.menuSelectedChallengeId) {
this.fetchScores(this.data.menuSelectedChallengeId);
}
if (oldData.challengeId !== this.data.challengeId) {
if (this.data.challengeId && oldData.challengeId !== this.data.challengeId) {
this.fetchScores(this.data.challengeId);
}
},

View File

@@ -1,14 +1,13 @@
<a-entity
id="leaderboard"
class="overlay"
class="overlay accuracyTextCounterSubscribe"
position="2 1.1 -1.27"
rotation="0 -50 0"
bind__visible="leaderboardFetched && menuActive || isPaused || isVictory"
bind__animation="enabled: isVictory"
animation="property: scale; from: 0 0 0; to: 1 1 1; easing: easeOutBack"
>
<!-- animation="property: scale; from: 0 0 0; to: 1 1 1; easing: easeOutBack" -->
bind__scale="isVictory && '0 0 0' || '1 1 1'"
bind__visible="(!!menuSelectedChallenge.id || !!challenge.id) && (menuActive || isPaused || isVictory) && !genreMenuOpen"
animation="property: scale; from: 0 0 0; to: 1 1 1; easing: easeOutBack; startEvents: textcounterdone">
<a-entity
mixin="slice"