From 8cab632d4a266be5050b72ed824e94d9217a0dbe Mon Sep 17 00:00:00 2001 From: lengstrom Date: Sun, 22 Jun 2014 12:32:23 -0400 Subject: [PATCH] fixed hexagon not being centered in the y axis during pauses --- js/Clock.js | 5 +++-- js/view.js | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/js/Clock.js b/js/Clock.js index 37e715c..80e34c2 100644 --- a/js/Clock.js +++ b/js/Clock.js @@ -127,9 +127,10 @@ function Clock(sideLength) { }; this.draw = function() { - this.ct++; + this.ct++; this.x = trueCanvas.width/2; - if (gameState == 1) { + + if (gameState != -2) { this.y = trueCanvas.height/2; } this.sideLength = settings.hexWidth; diff --git a/js/view.js b/js/view.js index 56d2d3b..c607a4c 100644 --- a/js/view.js +++ b/js/view.js @@ -9,8 +9,8 @@ function renderText(x, y, fontSize, color, text) { ctx.textAlign = 'center'; ctx.fillStyle = color; ctx.fillText(text, x, y + (fontSize / 2) - 9 * settings.scale); - } + scoreOpacity = 0; function drawScoreboard() { if(scoreOpacity < 1){