So much stuff happened idek

This commit is contained in:
rain
2023-11-16 15:03:24 -06:00
parent 839d6c2c20
commit 1eef69f514
8 changed files with 126 additions and 62 deletions
+18 -5
View File
@@ -22,11 +22,24 @@ export class UI {
// Frame Counter
//ctx.font = "10px Arial";
//ctx.fillText(this.game.frame, 0, 10);
if(this.game.hitboxes) {
ctx.fillStyle = 'black';
ctx.font = "10px Arial";
ctx.fillText(this.game.frame, 0, 10);
}
}
update(entity) {
this.hearts = entity.hearts;
update(game) {
this.game = game;
this.hearts = this.game.map.player.hearts;
// TODO: Adjust this later so players can long press 'b' with the same effects
let keys = this.game.input.keys;
if(keys.includes('b')) {
if(this.game.hitboxes) {
this.game.hitboxes = false;
} else {
this.game.hitboxes = true;
}
}
}
}