fixed restart problem
This commit is contained in:
parent
636a19f7fe
commit
1f068080e3
3 changed files with 4 additions and 10 deletions
|
@ -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;
|
||||
|
|
|
@ -82,6 +82,7 @@ function init(b) {
|
|||
clearSaveState();
|
||||
checkVisualElements();
|
||||
}
|
||||
checkVisualElements();
|
||||
if (highscores.length === 0 ){
|
||||
$("#currentHighScore").text(0);
|
||||
}
|
||||
|
|
|
@ -175,6 +175,7 @@ function gameOverDisplay() {
|
|||
}
|
||||
|
||||
}
|
||||
settings.ending_block=false;
|
||||
Cookies.set("visited",true);
|
||||
var c = document.getElementById("canvas");
|
||||
c.className = "blur";
|
||||
|
|
Loading…
Reference in a new issue