June 2015
Beginner
354 pages
8h 23m
English
untangle.drawing.js JavaScript file in text editor. Add the following code after the Canvas drawing code in the gameloop function, which draws the current level and progress text inside the Canvas:untangleGame.drawLevelProgress = function() {
var ctx = untangleGame.ctx;
ctx.font = "26px Arial";
ctx.fillStyle = "WHITE";
ctx.textAlign = "left";
ctx.textBaseline = "bottom";
ctx.fillText("Puzzle "+untangleGame.currentLevel+", Completeness: " + untangleGame.levelProgress + "%", 60, ctx.canvas.height-60);
}untangle.js file. We put the following code inside the gameloop function:untangleGame.drawLevelProgress();
Read now
Unlock full access