diff --git a/main.js b/main.js index b801779..4e6cc08 100644 --- a/main.js +++ b/main.js @@ -20,10 +20,10 @@ class Main { this.game.mapEdit.drawHitbox() } - // if(this.game.menu.check) { + if(this.game.menu.check) { this.game.keys.drawKeys() this.updateGame(); - /*} else { + } else { this.game.menu.drawMenu() if(this.game.keyManager.wasKeyJustPressed("KeyW")) { this.game.menu.fade() diff --git a/system/map-player/player/Player.js b/system/map-player/player/Player.js index 60e9123..395e1b3 100644 --- a/system/map-player/player/Player.js +++ b/system/map-player/player/Player.js @@ -315,7 +315,7 @@ export class Player { if(this.#collisionCheck(3, i, this.map) && !this.#collisionCheck(2, i, this.map)) { var offset = 25 //console.log("hit!") - if (this.velX > 0) { + if (this.velX < 0) { this.velX = 0 } var hitW = this.map.hitboxes[i].width