From 6c3b95e103ab03b116576d3866f0ad264f29b539 Mon Sep 17 00:00:00 2001 From: PASSER-BY Date: Fri, 10 Mar 2023 23:55:28 +0800 Subject: [PATCH] Update index.js --- index.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/index.js b/index.js index e43768a..2bb5b8b 100644 --- a/index.js +++ b/index.js @@ -570,7 +570,7 @@ context.textAlign = 'center'; context.textBaseline = 'middle'; context.fillStyle = '#AAA'; - context.fillText('Press ENTER to start',this.x,this.y); + context.fillText('Press Enter to start',this.x,this.y); } } }); @@ -797,11 +797,13 @@ context.closePath(); context.fill(); } - context.font = '20px PressStart2P'; + context.font = '18px PressStart2P'; context.textAlign = 'left'; context.textBaseline = 'center'; context.fillStyle = '#FFF'; - context.fillText('X '+(_LIFE-1),this.x-15,this.y+30); + context.fillText('X',this.x-15,this.y+30); + context.font = '24px PressStart2P'; + context.fillText((_LIFE-1),this.x+10,this.y+26); } }); //NPC