diff --git a/scripts/block-blast.js b/scripts/block-blast.js index 763e0ba..a4765f2 100644 --- a/scripts/block-blast.js +++ b/scripts/block-blast.js @@ -111,10 +111,10 @@ this.update() = { // Check if the mouse is inside the button's boundaries this.isHovering = - this.x >= this.x && - this.x <= this.x + this.w && - this.y >= this.y && - this.y <= this.y + this.h + mousePosition.x >= this.x && + mousePosition.x <= this.x + this.w && + mousePosition.y >= this.y && + mousePosition.y <= this.y + this.h if(this.key !== undefined && keys[this.key]){ this.isHovering = true }