Two units complete

This commit is contained in:
Anuken
2022-05-01 14:49:30 -04:00
parent 41a8be1b29
commit 865a5d56ed
19 changed files with 182 additions and 70 deletions

View File

@@ -11,6 +11,7 @@ public class ShootBarrel extends ShootPattern{
barrels = barrels.clone();
for(int i = 0; i < barrels.length; i += 3){
barrels[i] *= -1;
barrels[i + 2] *= -1;
}
}

View File

@@ -10,7 +10,7 @@ public class ShootHelix extends ShootPattern{
for(int i = 0; i < shots; i++){
for(int sign : Mathf.signs){
handler.shoot(0, 0, 0, firstShotDelay + shotDelay * i,
b -> b.moveRelative(0f, Mathf.sin(b.time + offset, 2f, mag * sign)));
b -> b.moveRelative(0f, Mathf.sin(b.time + offset, scl, mag * sign)));
}
}
}

View File

@@ -29,9 +29,9 @@ public class ShootMulti extends ShootPattern{
source.shoot(totalShots, (x, y, rotation, delay, move) -> {
for(var pattern : dest){
pattern.shoot(totalShots, (x2, y2, rot2, delay2, mover) -> {
handler.shoot(x + x2, y + y2, rotation + rot2, delay + delay2, b -> {
move.move(b);
mover.move(b);
handler.shoot(x + x2, y + y2, rotation + rot2, delay + delay2, move == null && mover == null ? null : b -> {
if(move != null) move.move(b);
if(mover != null) mover.move(b);
});
});
}