fixed restart on mobile

This commit is contained in:
Garrett Finucane 2015-08-26 23:35:53 -04:00
parent 41fd87ae32
commit 7fff4583f5

View file

@ -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