Hastily implemented final endgame turret
This commit is contained in:
26
core/src/mindustry/entities/pattern/ShootSummon.java
Normal file
26
core/src/mindustry/entities/pattern/ShootSummon.java
Normal file
@@ -0,0 +1,26 @@
|
||||
package mindustry.entities.pattern;
|
||||
|
||||
import arc.math.*;
|
||||
import arc.util.*;
|
||||
|
||||
public class ShootSummon extends ShootPattern{
|
||||
public float x, y, radius, spread;
|
||||
|
||||
public ShootSummon(float x, float y, float radius, float spread){
|
||||
this.x = x;
|
||||
this.y = y;
|
||||
this.radius = radius;
|
||||
this.spread = spread;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void shoot(int totalShots, BulletHandler handler){
|
||||
|
||||
|
||||
for(int i = 0; i < shots; i++){
|
||||
Tmp.v1.trns(Mathf.random(360f), Mathf.random(radius));
|
||||
|
||||
handler.shoot(x + Tmp.v1.x, y + Tmp.v1.y, Mathf.range(spread), firstShotDelay + shotDelay * i);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user