changed restart btn to always restart the game instead of sometimes also resuming
This commit is contained in:
parent
38e7423f24
commit
4f15bfa423
1 changed files with 4 additions and 15 deletions
19
js/input.js
19
js/input.js
|
@ -75,25 +75,14 @@ function addKeyListeners() {
|
|||
|
||||
if(/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent) ) {
|
||||
$("#restartBtn").on('touchstart', function() {
|
||||
if (gameState==2 || gameState==1 || importing == 1) {
|
||||
init(1);
|
||||
canRestart = false;
|
||||
}
|
||||
else if (gameState===0) {
|
||||
resumeGame();
|
||||
}
|
||||
|
||||
init(1);
|
||||
canRestart = false;
|
||||
});
|
||||
}
|
||||
else {
|
||||
$("#restartBtn").on('mousedown', function() {
|
||||
if (gameState==2 || gameState==1 || importing == 1) {
|
||||
init(1);
|
||||
canRestart = false;
|
||||
}
|
||||
else if (gameState===0) {
|
||||
resumeGame();
|
||||
}
|
||||
init(1);
|
||||
canRestart = false;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue