Reposition and rename score fields
This commit is contained in:
@@ -109,9 +109,9 @@ AFRAME.registerState({
|
||||
*/
|
||||
playbuttonclick: (state) => {
|
||||
// Reset score.
|
||||
state.score.maxStreak = 0;
|
||||
state.score.combo = 0;
|
||||
state.score.score = 0;
|
||||
state.score.streak = 0;
|
||||
state.score.multiplier = 0;
|
||||
|
||||
// Set challenge. `beat-loader` is listening.
|
||||
Object.assign(state.challenge, state.menuSelectedChallenge);
|
||||
|
||||
@@ -1,30 +1,29 @@
|
||||
<a-entity id="gameInfo"
|
||||
bind__visible="!menu.active && !!challenge.id && !challenge.isLoading"
|
||||
position="0 0 -80"
|
||||
scale="100 100 100">
|
||||
<a-entity mixin="textFont"
|
||||
text="align: right; width: 1.25; value: SCORE; color: #d6d955; anchor: right; letterSpacing: -2"
|
||||
position="-0.089 0.183 -1.01"></a-entity>
|
||||
<a-entity mixin="textFont"
|
||||
text="width: 0.9; value: STREAK; color: #f95895; letterSpacing: -2; anchor: left"
|
||||
position="0.097 0.183 -1.01"></a-entity>
|
||||
<a-entity mixin="textFont"
|
||||
text="width: 0.7; value: MAX; color: #f95895; anchor: left; letterSpacing: -2"
|
||||
position="0.101 0.1 -1.01"></a-entity>
|
||||
|
||||
<a-entity id="score"
|
||||
bind__text="value: score.score"
|
||||
mixin="textFont"
|
||||
text="align: right; width: 2; color: #feffc1; anchor: right; letterSpacing: -2"
|
||||
position="-0.08 0.132 -1"></a-entity>
|
||||
<a-entity id="streak"
|
||||
bind__text="value: score.streak"
|
||||
mixin="textFont"
|
||||
text="width: 1.25; color: #ffbdd6; anchor: left; letterSpacing: -2"
|
||||
position="0.098 0.144 -1"></a-entity>
|
||||
<a-entity id="maxStreak"
|
||||
bind__text="value: score.maxStreak"
|
||||
mixin="textFont"
|
||||
text="width: 0.8; color: #ffbdd6; anchor: left; letterSpacing: -2"
|
||||
position="0.1 0.074 -1"></a-entity>
|
||||
<a-entity
|
||||
id="gameInfo"
|
||||
bind__visible="!menu.active && !!challenge.id && !challenge.isLoading">
|
||||
<a-entity position="0.80 0.01 -1.3">
|
||||
<a-entity
|
||||
id="score"
|
||||
bind__text="value: score.score"
|
||||
mixin="textFont"
|
||||
text="width: 2; color: #feffc1; letterSpacing: -2;"
|
||||
rotation="-90 0 0">
|
||||
</a-entity>
|
||||
</a-entity>
|
||||
<a-entity
|
||||
id="combo"
|
||||
bind__text="value: score.combo"
|
||||
mixin="textFont"
|
||||
text="width: 1; color: #feffc1; letterSpacing: -2; align: center"
|
||||
position="-1.8 1.2 -4"
|
||||
scale="5 5 5">
|
||||
</a-entity>
|
||||
<a-entity
|
||||
id="multiplier"
|
||||
bind__text="value: score.multiplier"
|
||||
mixin="textFont"
|
||||
text="width: 1; color: #feffc1; letterSpacing: -2; align: center"
|
||||
position="1.8 1.2 -4"
|
||||
scale="5 5 5">
|
||||
</a-entity>
|
||||
</a-entity>
|
||||
|
||||
Reference in New Issue
Block a user