"grabage struct"
This commit is contained in:
@@ -82,6 +82,9 @@ public abstract class BulletType extends Content{
|
||||
public int lightining;
|
||||
public int lightningLength = 5;
|
||||
|
||||
public float weaveScale = 1f;
|
||||
public float weaveMag = -1f;
|
||||
|
||||
public float hitShake = 0f;
|
||||
|
||||
public BulletType(float speed, float damage){
|
||||
@@ -165,6 +168,10 @@ public abstract class BulletType extends Content{
|
||||
b.vel().setAngle(Mathf.slerpDelta(b.rotation(), b.angleTo(target), 0.08f));
|
||||
}
|
||||
}
|
||||
|
||||
if(weaveMag > 0){
|
||||
b.vel().rotate(Mathf.sin(Time.time() + b.id() * 3, weaveScale, weaveMag) * Time.delta());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -10,9 +10,6 @@ import mindustry.graphics.Pal;
|
||||
public class MissileBulletType extends BasicBulletType{
|
||||
protected Color trailColor = Pal.missileYellowBack;
|
||||
|
||||
protected float weaveScale = 1f;
|
||||
protected float weaveMag = -1f;
|
||||
|
||||
public MissileBulletType(float speed, float damage, String bulletSprite){
|
||||
super(speed, damage, bulletSprite);
|
||||
backColor = Pal.missileYellowBack;
|
||||
@@ -32,9 +29,5 @@ public class MissileBulletType extends BasicBulletType{
|
||||
if(Mathf.chance(Time.delta() * 0.2)){
|
||||
Fx.missileTrail.at(b.x(), b.y(), 2f, trailColor);
|
||||
}
|
||||
|
||||
if(weaveMag > 0){
|
||||
b.vel().rotate(Mathf.sin(Time.time() + b.id() * 3, weaveScale, weaveMag) * Time.delta());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user