rename victoryfake event to test victory
This commit is contained in:
@@ -44,7 +44,7 @@ AFRAME.registerComponent('song', {
|
|||||||
this.el.addEventListener('wallhitend', this.onWallHitEnd.bind(this));
|
this.el.addEventListener('wallhitend', this.onWallHitEnd.bind(this));
|
||||||
|
|
||||||
if (process.env.NODE_ENV !== 'production') {
|
if (process.env.NODE_ENV !== 'production') {
|
||||||
this.el.addEventListener('fakevictory', () => {
|
this.el.addEventListener('victoryfake', () => {
|
||||||
this.source.stop();
|
this.source.stop();
|
||||||
this.source.disconnect();
|
this.source.disconnect();
|
||||||
this.victory();
|
this.victory();
|
||||||
|
|||||||
@@ -437,6 +437,11 @@ AFRAME.registerState({
|
|||||||
computeBeatsText(state);
|
computeBeatsText(state);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
victoryfake: function (state) {
|
||||||
|
state.score.accuracy = '12.34%';
|
||||||
|
state.score.rank = 'F';
|
||||||
|
},
|
||||||
|
|
||||||
wallhitstart: function (state) {
|
wallhitstart: function (state) {
|
||||||
takeDamage(state);
|
takeDamage(state);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -30,7 +30,7 @@
|
|||||||
id="victoryInfoAccuracy"
|
id="victoryInfoAccuracy"
|
||||||
mixin="font"
|
mixin="font"
|
||||||
bind__text-counter="value: score.accuracy"
|
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"
|
text-counter="suffix: %; decimals: 2; emit: true"
|
||||||
proxy-event="event: textcounterdone; to: .accuracyTextCounterSubscribe"
|
proxy-event="event: textcounterdone; to: .accuracyTextCounterSubscribe"
|
||||||
position="0.75 0.725 0"></a-entity>
|
position="0.75 0.725 0"></a-entity>
|
||||||
|
|||||||
Reference in New Issue
Block a user