Merge branch 'master' of gitea.tforgione.fr:escalator/escalator-web

This commit is contained in:
Thibault Blanc Beyne 2018-08-22 14:05:33 +02:00
commit b908734258
1 changed files with 5 additions and 2 deletions

View File

@ -176,6 +176,10 @@ class Scene extends Screen {
this.context.moveTo(0, height); this.context.moveTo(0, height);
this.context.lineTo(this.width(), height); this.context.lineTo(this.width(), height);
this.context.stroke(); this.context.stroke();
this.context.font = "15px Arial";
this.context.fillStyle = "rgb(255, 255, 255)";
this.context.fillText("High score: " + Math.floor(100 * this.currentMaxHeight), 0, height - 5);
} }
drawObject(object) { drawObject(object) {
@ -208,8 +212,7 @@ class Scene extends Screen {
let fontSize = 20; let fontSize = 20;
this.context.font = fontSize + "px Arial"; this.context.font = fontSize + "px Arial";
this.context.fillStyle = 'rgb(255, 255, 255)'; this.context.fillStyle = 'rgb(255, 255, 255)';
this.context.fillText("Current score: " + Math.floor(100 * this.currentHeight), 0, 20); this.context.fillText("Score: " + Math.floor(100 * this.currentHeight), 0, 20);
this.context.fillText("High score: " + Math.floor(100 * this.maxHeight), 0, 50);
// Draw pause buttons // Draw pause buttons
let box = this.makePauseBox(); let box = this.makePauseBox();