Added bullet original pos return paramater

This commit is contained in:
sam
2023-12-05 13:23:09 +01:00
parent 10a4aee3e0
commit 6feaa8e08e
2 changed files with 3 additions and 2 deletions

View File

@@ -49,8 +49,9 @@ class bullet {
shot = false;
}
let isOffScreen = this.projectile.x < 0 || this.projectile.x > width || this.projectile.y < 0 || this.projectile.y > height;
let originalPos = this.projectile.x == this.targetx || this.projectile.y == this.targety;
return { hit, shot, isOffScreen};
return { hit, shot, isOffScreen, originalPos};
}
}