fixed restart problem

This commit is contained in:
Garrett Finucane 2015-08-26 21:57:52 -04:00
parent 636a19f7fe
commit 1f068080e3
3 changed files with 4 additions and 10 deletions

View file

@ -106,10 +106,6 @@ function addKeyListeners() {
if(/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)) {
$("#restartBtn").on('touchstart', function() {
init(1);
canRestart = false;
});
$("#restart").on('touchstart', function() {
init();
canRestart = false;
@ -118,10 +114,6 @@ function addKeyListeners() {
}
else {
$("#restartBtn").on('mousedown', function() {
init(1);
canRestart = false;
});
$("#restart").on('mousedown', function() {
init();
canRestart = false;

View file

@ -82,6 +82,7 @@ function init(b) {
clearSaveState();
checkVisualElements();
}
checkVisualElements();
if (highscores.length === 0 ){
$("#currentHighScore").text(0);
}

View file

@ -175,6 +175,7 @@ function gameOverDisplay() {
}
}
settings.ending_block=false;
Cookies.set("visited",true);
var c = document.getElementById("canvas");
c.className = "blur";