diff --git a/js/initialization.js b/js/initialization.js index 47a3300..a22adf8 100644 --- a/js/initialization.js +++ b/js/initialization.js @@ -64,6 +64,7 @@ function initialize(a) { blockHeight: 20, rows: 7, speedModifier: 0.73, + speedUpKeyHeld: false, creationSpeedModifier: 0.73, comboTime: 310 }; @@ -82,6 +83,7 @@ function initialize(a) { blockHeight: 15, rows: 8, speedModifier: 0.65, + speedUpKeyHeld: false, creationSpeedModifier: 0.65, comboTime: 310 }; diff --git a/js/input.js b/js/input.js index c559fb0..190f66f 100644 --- a/js/input.js +++ b/js/input.js @@ -16,6 +16,29 @@ function addKeyListeners() { } } }); + keypress.register_combo({ + keys: "down", + on_keydown: function() { + var tempSpeed = settings.speedModifier; + if (MainHex && gameState !== 0){ + //speed up block temporarily + if(settings.speedUpKeyHeld == false){ + settings.speedUpKeyHeld = true; + window.rush *=4; + } + } + //settings.speedModifier = tempSpeed; + }, + on_keyup:function(){ + if (MainHex && gameState !== 0){ + //speed up block temporarily + + window.rush /=4; + settings.speedUpKeyHeld = false; + } + } + }); + keypress.register_combo({ keys: "a", on_keydown: function() { @@ -33,7 +56,29 @@ function addKeyListeners() { } } }); - + + keypress.register_combo({ + keys: "s", + on_keydown: function() { + var tempSpeed = settings.speedModifier; + if (MainHex && gameState !== 0){ + //speed up block temporarily + if(settings.speedUpKeyHeld == false){ + settings.speedUpKeyHeld = true; + window.rush *=4; + } + } + //settings.speedModifier = tempSpeed; + }, + on_keyup:function(){ + if (MainHex && gameState !== 0){ + //speed up block temporarily + + window.rush /=4; + settings.speedUpKeyHeld = false; + } + } + }); keypress.register_combo({ keys: "p", on_keydown: function(){pause();} diff --git a/js/main.js b/js/main.js index 455e5fa..9010175 100644 --- a/js/main.js +++ b/js/main.js @@ -96,7 +96,7 @@ function init(b) { } setTimeout(function() { - if (gameState == 1) { + if (gameState == 1) { $('#openSideBar').fadeOut(150, "linear"); } infobuttonfading = false; @@ -362,7 +362,7 @@ function showHelp() { } } - $("#inst_main_body").html("
HOW TO PLAY

The goal of Hextris is to stop blocks from leaving the inside of the outer gray hexagon.

" + (settings.platform != 'mobile' ? 'Press the right and left arrow keys' : 'Tap the left and right sides of the screen') + " to rotate the Hexagon

Clear blocks and get points by making 3 or more blocks of the same color touch.

Time left before your combo streak disappears is indicated by the colored lines on the outer hexagon.


By Logan Engstrom & Garrett Finucane
Find Hextris on iOS & Android
More @ the Hextris Website"); + $("#inst_main_body").html("
HOW TO PLAY

The goal of Hextris is to stop blocks from leaving the inside of the outer gray hexagon.

" + (settings.platform != 'mobile' ? 'Press the right and left arrow keys' : 'Tap the left and right sides of the screen') + " to rotate the Hexagon." + (settings.platform != 'mobile' ? ' Press the down arrow to speed up the block falling': '') + "

Clear blocks and get points by making 3 or more blocks of the same color touch.

Time left before your combo streak disappears is indicated by the colored lines on the outer hexagon


By Logan Engstrom & Garrett Finucane
Find Hextris on iOS & Android
More @ the Hextris Website"); if (gameState == 1) { pause(); } diff --git a/js/view.js b/js/view.js index 18cc703..51fb5ba 100644 --- a/js/view.js +++ b/js/view.js @@ -34,9 +34,9 @@ function drawScoreboard() { } else if (scoreString.length == 9) { scoreSize = 27; } - if (rush ==1){ + //if (rush ==1){ var color = "rgb(236, 240, 241)"; - } + //} var fontSize = settings.platform == 'mobile' ? 35 : 30; var h = trueCanvas.height / 2 + gdy + 100 * settings.scale; if (gameState === 0) {