fixed top score

This commit is contained in:
Garrett Finucane 2015-08-26 21:28:53 -04:00
parent fe8ed1ec5b
commit 6135359465
2 changed files with 13 additions and 1 deletions

View file

@ -82,7 +82,12 @@ function init(b) {
clearSaveState();
checkVisualElements();
}
if (highscores.length === 0 ){
$("#currentHighScore").text(0);
}
else {
$("#currentHighScore").text(highscores[0])
}
infobuttonfading = true;
$("#pauseBtn").attr('src',"./images/btn_pause.svg");
hideUIElements();

View file

@ -179,6 +179,13 @@ function gameOverDisplay() {
var c = document.getElementById("canvas");
c.className = "blur";
updateHighScores();
if (highscores.length === 0 ){
$("#currentHighScore").text(0);
}
else {
$("#currentHighScore").text(highscores[0])
}
$("#gameoverscreen").fadeIn();
$("#buttonCont").fadeIn();
$("#container").fadeIn();