diff --git a/src/Gun.js b/src/Gun.js index 49a693f..5f7287a 100644 --- a/src/Gun.js +++ b/src/Gun.js @@ -31,7 +31,7 @@ class Gun extends Subject { noCursor(); if (this.cursorImg) { - image(this.cursorImg, mouseX, mouseY, CURSOR_SIZE, CURSOR_SIZE); + image(this.cursorImg, mouseX - CURSOR_SIZE / 2, mouseY - CURSOR_SIZE / 2, CURSOR_SIZE, CURSOR_SIZE); } // custom cursor for (let bullet of this.bullets) { @@ -40,8 +40,8 @@ class Gun extends Subject { this.bullets = this.bullets.filter(bullet => bullet.visible); // clean up bullet holes } - - shoot() { + + shoot() { if (this.remainingShots > 0) { this.remainingShots--;