From 1cddf13e359fd89cc9bb4ba2ac9262c8a710b7d0 Mon Sep 17 00:00:00 2001 From: Thomas Forgione Date: Wed, 22 Aug 2018 13:59:33 +0200 Subject: [PATCH] Moved high score to the high score line --- src/scene.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/scene.js b/src/scene.js index f05172b..af20526 100644 --- a/src/scene.js +++ b/src/scene.js @@ -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();