From c31bd7f95b2a1df2370acd7d6ba5e1495d46886f Mon Sep 17 00:00:00 2001 From: sam Date: Tue, 28 Nov 2023 15:44:55 +0100 Subject: [PATCH] renamed variables --- web/js/basicbullet.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/web/js/basicbullet.js b/web/js/basicbullet.js index e747d8f..3c47d4a 100644 --- a/web/js/basicbullet.js +++ b/web/js/basicbullet.js @@ -9,9 +9,9 @@ class bullet { this.speed = speed; // Set the initial position of the projectile to the player's position - let projectile = createVector(shotPosX, shotPosY); - x = directionX; - y = directionY; + let projectile = createVector(this.x, this.y); + this.x = directionX; + this.y = directionY; // Calculate the initial direction direction = createVector(targetX - projectile.x, targetY - projectile.y);