Merge branch 'master' of gitea.tforgione.fr:escalator/escalator-web
This commit is contained in:
commit
b908734258
|
@ -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();
|
||||
|
|
Loading…
Reference in New Issue