From e70692353dec6d24f4e2b9a049de5dde8d16fe80 Mon Sep 17 00:00:00 2001 From: Kevin Ngo Date: Tue, 11 Dec 2018 01:50:23 -0800 Subject: [PATCH] temp fix score nan --- src/state/index.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/state/index.js b/src/state/index.js index 7e51c3c..817bf0e 100644 --- a/src/state/index.js +++ b/src/state/index.js @@ -127,6 +127,7 @@ AFRAME.registerState({ state.score.maxCombo = state.score.combo; } + payload.score = isNaN(payload.score) ? 100 : payload.score; state.score.score += Math.floor(payload.score * state.score.multiplier); // Might be a math formula for this, but the multiplier system is easy reduced.