fix scoring/damage hook up on beat hit/misses

This commit is contained in:
Kevin Ngo
2018-10-13 08:53:58 -07:00
parent 7960013914
commit 40d99e5df9
2 changed files with 9 additions and 12 deletions

View File

@@ -83,7 +83,7 @@ AFRAME.registerState({
localStorage.setItem('activeHand', state.activeHand);
},
goodhit: state => {
beathit: state => {
if (state.damage > DAMAGE_DECAY) {
state.damage -= DAMAGE_DECAY;
}
@@ -91,13 +91,14 @@ AFRAME.registerState({
state.score.combo += 1;
},
/**
* Not implemented.
*/
beatmiss: state => {
takeDamage(state);
},
beatwrong: state => {
takeDamage(state);
},
beatloaderfinish: (state) => {
state.challenge.isLoading = false;
},
@@ -244,10 +245,6 @@ AFRAME.registerState({
victory: function (state) {
state.isVictory = true;
},
wronghit: state => {
takeDamage(state);
}
},