From 80216e5c30b13b5961620e91b47a669218605b16 Mon Sep 17 00:00:00 2001 From: rain Date: Thu, 16 Nov 2023 21:44:38 -0600 Subject: [PATCH] Added level display dev text and started a gitignore --- .gitignore | 1 + js/ui.js | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..f1fddd3 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +*.swp \ No newline at end of file diff --git a/js/ui.js b/js/ui.js index 0f52d18..261318d 100644 --- a/js/ui.js +++ b/js/ui.js @@ -21,12 +21,12 @@ export class UI { ctx.drawImage(img, this.x - offset, this.y+this.padding, this.width, this.height); } - // Frame Counter if(this.game.hitboxes) { ctx.fillStyle = 'black'; ctx.font = "10px Arial"; - ctx.fillText(this.game.frame, 0, 10); + ctx.fillText("FPS: " + this.game.frame, 0, 10); + ctx.fillText("LVL: " + this.game.map.map.name, 0, 20); } } update(game) {