score fades in

This commit is contained in:
garrettdreyfus 2014-05-26 14:24:38 -04:00
parent bc548d3240
commit 93696511e2

View file

@ -36,9 +36,14 @@ function renderText(x, y, fontSize, color, text) {
ctx.fillText(text, x, y + (fontSize / 4) + 3.5);
}
var scoreOpacity = 0;
function drawScoreboard() {
if(scoreOpacity < 1){
scoreOpacity+=(1/1-scoreOpacity)/100;
}
ctx.globalAlpha = scoreOpacity;
renderText(trueCanvas.width / 2 + gdx, trueCanvas.height / 2 + gdy, 50, "#fff", score);
ctx.globalAlpha = 1;
}
function clearGameBoard() {