added angle reset

This commit is contained in:
Mees Roelofsz
2023-12-01 11:44:01 +01:00
parent b463e3d7b7
commit 2dee899383

View File

@@ -244,8 +244,9 @@ function spawnRandomBullet() {
setTimeout(function() { setTimeout(function() {
bullets.push(new bullet(0, 100, radius, shotSpeed/4, shotPosX, shotPosY, hasMoved, angle)); bullets.push(new bullet(0, 100, radius, shotSpeed/4, shotPosX, shotPosY, hasMoved, angle));
angle -= 360 / 3; angle -= 360 / 3;
}, i * 200); }, i * 100);
} }
angle = 0;
} }
if (patern == 4) { if (patern == 4) {
@@ -257,6 +258,7 @@ function spawnRandomBullet() {
bullets.push(new bullet(0, 100, radius, shotSpeed/4, shotPosX, shotPosY, hasMoved, angle)); bullets.push(new bullet(0, 100, radius, shotSpeed/4, shotPosX, shotPosY, hasMoved, angle));
angle -= 360 / 3; angle -= 360 / 3;
} }
angle = 0;
} }