Merge branch 'gh-pages' of https://github.com/teamsnowman/hextris into gh-pages
This commit is contained in:
commit
2af21065af
2 changed files with 24 additions and 9 deletions
|
@ -7,7 +7,7 @@
|
|||
<link rel="stylesheet" type="text/css" href="style/style.css">
|
||||
<link rel="stylesheet" href="style/fa/css/font-awesome.min.css">
|
||||
</head>
|
||||
<body onload="loadListeners()">
|
||||
<body>
|
||||
<canvas id="canvas"></canvas>
|
||||
<div id='devtools' style='z-index:3;display:none;position:absolute;left:50%;width:400px;height:400px;top:50%;margin-top:-200px;margin-left:-200px;'>
|
||||
<h2 id = 'clickToExit' style = 'background-color:#fff;color:#000'>Click to exit</h2>
|
||||
|
|
31
js/input.js
31
js/input.js
|
@ -105,15 +105,30 @@ $(document).ready(function(){
|
|||
return false;
|
||||
});
|
||||
|
||||
$("#restartBtn").on('touchstart mousedown', function() {
|
||||
if (gameState==2 || gameState==1 || importing == 1) {
|
||||
init(1);
|
||||
}
|
||||
if (gameState===0) {
|
||||
resumeGame();
|
||||
}
|
||||
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();
|
||||
}
|
||||
|
||||
});
|
||||
});
|
||||
}
|
||||
else {
|
||||
$("#restartBtn").on('mousedown', function() {
|
||||
if (gameState==2 || gameState==1 || importing == 1) {
|
||||
init(1);
|
||||
canRestart=false;
|
||||
}
|
||||
else if (gameState===0) {
|
||||
resumeGame();
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
}, false);
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue