rename victoryfake event to test victory

This commit is contained in:
Kevin Ngo
2018-11-17 05:52:43 -08:00
parent 836c76b412
commit 5e43d0107a
3 changed files with 7 additions and 2 deletions

View File

@@ -44,7 +44,7 @@ AFRAME.registerComponent('song', {
this.el.addEventListener('wallhitend', this.onWallHitEnd.bind(this));
if (process.env.NODE_ENV !== 'production') {
this.el.addEventListener('fakevictory', () => {
this.el.addEventListener('victoryfake', () => {
this.source.stop();
this.source.disconnect();
this.victory();

View File

@@ -437,6 +437,11 @@ AFRAME.registerState({
computeBeatsText(state);
},
victoryfake: function (state) {
state.score.accuracy = '12.34%';
state.score.rank = 'F';
},
wallhitstart: function (state) {
takeDamage(state);
}

View File

@@ -30,7 +30,7 @@
id="victoryInfoAccuracy"
mixin="font"
bind__text-counter="value: score.accuracy"
text="align: left; color: #FAFAFA; wrapCount: 22; baseline: top; width: 0.81"
text="align: left; color: #FAFAFA; wrapCount: 22; baseline: top; width: 0.81; value: 0.00%"
text-counter="suffix: %; decimals: 2; emit: true"
proxy-event="event: textcounterdone; to: .accuracyTextCounterSubscribe"
position="0.75 0.725 0"></a-entity>