fixed restart on mobile
This commit is contained in:
parent
41fd87ae32
commit
7fff4583f5
1 changed files with 9 additions and 0 deletions
|
@ -121,6 +121,15 @@ function addKeyListeners() {
|
|||
});
|
||||
|
||||
}
|
||||
if(/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)) {
|
||||
$("#restartBtn").on('touchstart', function() {
|
||||
init(1);
|
||||
canRestart = false;
|
||||
$("#gameoverscreen").fadeOut();
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
function inside (point, vs) {
|
||||
// ray-casting algorithm based on
|
||||
|
|
Loading…
Reference in a new issue