Multi shotgun fix (#8460)
* Multi-barrel shotgun fix * multi-recoil support * @Nullable for everything
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
package mindustry.entities.pattern;
|
||||
|
||||
import arc.util.*;
|
||||
|
||||
public class ShootMulti extends ShootPattern{
|
||||
public ShootPattern source;
|
||||
public ShootPattern[] dest = {};
|
||||
@@ -25,7 +27,7 @@ public class ShootMulti extends ShootPattern{
|
||||
}
|
||||
|
||||
@Override
|
||||
public void shoot(int totalShots, BulletHandler handler){
|
||||
public void shoot(int totalShots, BulletHandler handler, @Nullable Runnable barrelIncrementer){
|
||||
source.shoot(totalShots, (x, y, rotation, delay, move) -> {
|
||||
for(var pattern : dest){
|
||||
pattern.shoot(totalShots, (x2, y2, rot2, delay2, mover) -> {
|
||||
@@ -35,6 +37,6 @@ public class ShootMulti extends ShootPattern{
|
||||
});
|
||||
});
|
||||
}
|
||||
});
|
||||
}, barrelIncrementer);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user