score fades in
This commit is contained in:
parent
bc548d3240
commit
93696511e2
1 changed files with 6 additions and 1 deletions
|
@ -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() {
|
||||
|
|
Loading…
Reference in a new issue