renamed variables
This commit is contained in:
@@ -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);
|
||||
|
Reference in New Issue
Block a user