fixed top score
This commit is contained in:
parent
fe8ed1ec5b
commit
6135359465
2 changed files with 13 additions and 1 deletions
|
@ -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();
|
||||
|
|
|
@ -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();
|
||||
|
|
Loading…
Reference in a new issue