changed restart btn to always restart the game instead of sometimes also resuming

This commit is contained in:
lengstrom 2014-07-23 09:47:03 -04:00
parent 38e7423f24
commit 4f15bfa423

View file

@ -75,25 +75,14 @@ function addKeyListeners() {
if(/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent) ) { if(/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent) ) {
$("#restartBtn").on('touchstart', function() { $("#restartBtn").on('touchstart', function() {
if (gameState==2 || gameState==1 || importing == 1) { init(1);
init(1); canRestart = false;
canRestart = false;
}
else if (gameState===0) {
resumeGame();
}
}); });
} }
else { else {
$("#restartBtn").on('mousedown', function() { $("#restartBtn").on('mousedown', function() {
if (gameState==2 || gameState==1 || importing == 1) { init(1);
init(1); canRestart = false;
canRestart = false;
}
else if (gameState===0) {
resumeGame();
}
}); });
} }
} }