Merge branch 'gh-pages' of http://github.com/hextris/hextris into gh-pages

This commit is contained in:
Garrett Finucane 2014-07-22 22:19:42 -04:00
commit 6a41ef0d45
4 changed files with 13 additions and 34 deletions

View file

@ -75,26 +75,25 @@ 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 || gameState==1 || importing == 1) {
if (gameState==2 || gameState==1 || importing == 1) {
init(1);
canRestart = false;
}
else if (gameState===0) {
init(1)();
resumeGame();
}
});
}
else {
$("#restartBtn").on('mousedown', function() {
if (gameState==2 || gameState == -1 || gameState==1 || importing == 1) {
if (gameState==2 || gameState==1 || importing == 1) {
init(1);
canRestart=false;
canRestart = false;
}
else if (gameState===0) {
resumeGame();
}
});
}
}

View file

@ -1,4 +1,4 @@
function scaleCanvas() {
function scaleCanvas() {
canvas.width = $(window).width();
canvas.height = $(window).height();
@ -286,7 +286,6 @@ function enableRestart() {
}
function updateHighScore(){
//debugger;
for(var i = 0; i<numHighScores;i++) {
if(highscores[i]<=score) {
highscores.splice(i,0,score);
@ -302,8 +301,9 @@ function isInfringing(hex){
for(var i=0;i<hex.sides;i++){
var subTotal=0;
for (var j=0;j<hex.blocks[i].length;j++){
subTotal+=hex.blocks[i][j].deleted ;
subTotal+=hex.blocks[i][j].deleted;
}
if (hex.blocks[i].length- subTotal>settings.rows){
return true;
}

View file

@ -103,7 +103,6 @@ function showText(text){
if (text == 'gameover') {
var allZ = 1;
var i;
console.log(highscores);
for (i = 0; i < 3; i++) {
if (highscores[i] !== undefined && (highscores[i] != 0 || (highscores[0] == 0 && i==0))) {
messages['gameover'] += "<tr> <th class='tg-031e'>"+(i+1)+".</th> <th class='tg-031e'>"+highscores[i] + " pts</th> </tr>";
@ -136,31 +135,11 @@ function showText(text){
}
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();
}
});
if (text == 'gameover') {
if (settings.platform == 'mobile') {
$('.tg').css('margin-top', '4px');
}
}
else {
$("#restartBtn").on('mousedown', function() {
if (gameState==2 || gameState==1 || importing == 1) {
init(1);
canRestart = false;
}
else if (gameState===0) {
resumeGame();
}
});
}
}
function setMainMenu() {

View file

@ -179,6 +179,7 @@ and (max-device-width : 480px) {
font-size:1.25em;
z-index:98;
}
@media only screen
and (min-device-width : 320px)
and (max-device-width : 580px) {
@ -199,7 +200,7 @@ and (max-device-width : 580px) {
#overlay {
margin-top: -20%;
}
}
}
.blur {
opacity:0.1;