From 687009f8fc79485b80de6b8cd1b10c26ca310d0d Mon Sep 17 00:00:00 2001 From: Yewon Date: Sun, 18 May 2025 22:09:09 +0900 Subject: [PATCH] Editing Gun.js - align gun --- src/Gun.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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--;