Allow flipped shot patterns

This commit is contained in:
Anuke
2022-03-05 23:06:19 -05:00
parent 7bf25cc46e
commit cc3116f329
5 changed files with 43 additions and 4 deletions

View File

@@ -12,6 +12,18 @@ public class ShootMulti extends ShootPattern{
public ShootMulti(){
}
//deep copy needed for flips
@Override
public void flip(){
source = source.copy();
source.flip();
dest = dest.clone();
for(int i = 0; i < dest.length; i++){
dest[i] = dest[i].copy();
dest[i].flip();
}
}
@Override
public void shoot(int totalShots, BulletHandler handler){
source.shoot(totalShots, (x, y, rotation, delay, move) -> {