Moved high score to the high score line

This commit is contained in:
Thomas Forgione 2018-08-22 13:59:33 +02:00
parent 743282db43
commit 1cddf13e35
No known key found for this signature in database
GPG Key ID: 203DAEA747F48F41
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.lineTo(this.width(), height);
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) {
@ -208,8 +212,7 @@ class Scene extends Screen {
let fontSize = 20;
this.context.font = fontSize + "px Arial";
this.context.fillStyle = 'rgb(255, 255, 255)';
this.context.fillText("Current score: " + Math.floor(100 * this.currentHeight), 0, 20);
this.context.fillText("High score: " + Math.floor(100 * this.maxHeight), 0, 50);
this.context.fillText("Score: " + Math.floor(100 * this.currentHeight), 0, 20);
// Draw pause buttons
let box = this.makePauseBox();