fix victory rank text layout when has + or -
This commit is contained in:
@@ -224,7 +224,7 @@ AFRAME.registerState({
|
||||
state.score.beatsHit = 125;
|
||||
state.score.beatsMissed = 125;
|
||||
state.score.maxCombo = 123;
|
||||
state.score.rank = 'B';
|
||||
state.score.rank = 'C';
|
||||
state.score.score = 9001;
|
||||
computeBeatsText(state);
|
||||
},
|
||||
@@ -453,10 +453,8 @@ AFRAME.registerState({
|
||||
const accuracy = (state.score.score / (totalBeats * 110)) * 100;
|
||||
state.score.accuracy = accuracy;
|
||||
|
||||
if (accuracy === 1) {
|
||||
if (accuracy >= 95) {
|
||||
state.score.rank = 'S';
|
||||
} else if (accuracy >= 98) {
|
||||
state.score.rank = 'A+';
|
||||
} else if (accuracy >= 93) {
|
||||
state.score.rank = 'A';
|
||||
} else if (accuracy >= 90) {
|
||||
|
||||
@@ -20,11 +20,11 @@
|
||||
bind__animation="enabled: isVictory"
|
||||
bind__victory-rank="rank: score.rank"
|
||||
scale="0 0 0"
|
||||
position="0 0.2 0.125"
|
||||
position="0 0.15 0.25"
|
||||
animation__rotation="property: object3D.rotation.y; from: 0; to: -360; loop: true; easing: linear; dur: 5000; startEvents: textcounterdone"
|
||||
animation__scale="property: scale; from: 0 0 0; to: 1 1 1; loop: false; easing: easeOutQuad; dur: 300; startEvents: textcounterdone"
|
||||
play-sound="sound: #victorySound; event: textcounterdone"
|
||||
text="wrapCount: 2; align: center; baseline: top; width: 0.82; side: double"></a-entity>
|
||||
text="wrapCount: 3; align: center; baseline: center; width: 0.82; side: double"></a-entity>
|
||||
|
||||
<a-entity
|
||||
id="victoryInfoAccuracy"
|
||||
|
||||
Reference in New Issue
Block a user