removed canvas instructions from pause menu
This commit is contained in:
parent
99f7b8a748
commit
43c27a0df4
3 changed files with 15 additions and 5 deletions
|
@ -1,4 +1,7 @@
|
|||
$(document).ready(initialize);
|
||||
|
||||
$(document).ready(function(){
|
||||
initialize();
|
||||
});
|
||||
|
||||
function initialize(a) {
|
||||
//view.js
|
||||
|
@ -183,6 +186,16 @@ function initialize(a) {
|
|||
|
||||
ga('create', 'UA-51272720-1', 'teamsnowman.github.io');
|
||||
ga('send', 'pageview');
|
||||
|
||||
document.addEventListener("pause", handlePause, false);
|
||||
document.addEventListener("backbutton", handlePause, false);
|
||||
document.addEventListener("menubutton", handlePause, false); //menu button on android
|
||||
}
|
||||
}
|
||||
|
||||
function handlePause() {
|
||||
if (gameState == 1 || gameState == 2) {
|
||||
pause()
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -52,7 +52,7 @@ function render() {
|
|||
settings.hexWidth = settings.baseHexWidth * settings.scale;
|
||||
settings.blockHeight = settings.baseBlockHeight * settings.scale;
|
||||
|
||||
if ((MainHex.ct < 400 && (gameState !== 0) && !MainHex.playThrough) || gameState == -1) {
|
||||
if ((MainHex.ct < 400 && (gameState !== 0) && !MainHex.playThrough)) {
|
||||
if (MainHex.ct > 350) {
|
||||
ctx.globalAlpha = (50 - (MainHex.ct - 350))/50;
|
||||
}
|
||||
|
|
|
@ -131,12 +131,9 @@ function showText(text){
|
|||
pt.className = 'unfaded';
|
||||
|
||||
if (text == 'paused') {
|
||||
$(pt).css('margin-top','-5%');
|
||||
if (settings.platform == 'mobile') {
|
||||
text = 'pausedMobile';
|
||||
}
|
||||
} else {
|
||||
$(pt).css('margin-top','-10%');
|
||||
}
|
||||
|
||||
pt.innerHTML = messages[text];
|
||||
|
|
Loading…
Reference in a new issue