temp deleted patern 3

This commit is contained in:
Mees Roelofsz
2023-12-01 06:54:09 +01:00
parent 0d7f47c058
commit 9b8a58549b

View File

@@ -204,7 +204,7 @@ function randomAttackPattern() {
function spawnRandomBullet() {
let patern = random([1, 2, 3]);
let patern = random([1, 2]);
if (patern == 1) {
nextAttack = random([1, 2, 3, 4]);
text(nextAttack, 30, 50);
@@ -235,16 +235,16 @@ function spawnRandomBullet() {
shotPosY = bounceY;
bullets.push(new bullet(playerPosX, playerPosY, radius, shotSpeed, shotPosX, shotPosY, hasMoved, 0));
}
if (patern == 3) {
shotPosX = 500;
shotPosY = 100;
angle = 0;
// changing the angle of the bullets
for (let i = 0; i < 86; i++) {
bullets.push(new bullet(0, 100, radius, shotSpeed, shotPosX, shotPosY, hasMoved, angle));
angle -= 360 / 3;
}
}
// if (patern == 3) {
// shotPosX = 500;
// shotPosY = 100;
// angle = 0;
// // changing the angle of the bullets
// for (let i = 0; i < 86; i++) {
// bullets.push(new bullet(0, 100, radius, shotSpeed, shotPosX, shotPosY, hasMoved, angle));
// angle -= 360 / 3;
// }
// }
}