Variable mass driver bullets
This commit is contained in:
@@ -14,12 +14,11 @@ import static mindustry.Vars.content;
|
||||
public class MassDriverBolt extends BulletType{
|
||||
|
||||
public MassDriverBolt(){
|
||||
super(5.3f, 50);
|
||||
super(1f, 50);
|
||||
collidesTiles = false;
|
||||
lifetime = 200f;
|
||||
lifetime = 1f;
|
||||
despawnEffect = Fx.smeltsmoke;
|
||||
hitEffect = Fx.hitBulletBig;
|
||||
drag = 0.005f;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -13,7 +13,7 @@ import mindustry.world.blocks.payloads.*;
|
||||
/** An entity that holds a payload. */
|
||||
@Component
|
||||
abstract class PayloadComp implements Posc, Rotc{
|
||||
@Import float x, y;
|
||||
@Import float x, y, rotation;
|
||||
|
||||
Array<Payload> payloads = new Array<>();
|
||||
|
||||
@@ -44,7 +44,6 @@ abstract class PayloadComp implements Posc, Rotc{
|
||||
|
||||
if(tryDropPayload(load)){
|
||||
payloads.pop();
|
||||
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
@@ -70,6 +69,7 @@ abstract class PayloadComp implements Posc, Rotc{
|
||||
|
||||
u.set(this);
|
||||
u.trns(Tmp.v1.rnd(Mathf.random(2f)));
|
||||
u.rotation(rotation);
|
||||
u.add();
|
||||
Fx.unitDrop.at(u);
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ import mindustry.graphics.*;
|
||||
|
||||
public class SurgeWall extends Wall{
|
||||
public float lightningChance = 0.05f;
|
||||
public float lightningDamage = 15f;
|
||||
public float lightningDamage = 20f;
|
||||
public int lightningLength = 17;
|
||||
|
||||
public SurgeWall(String name){
|
||||
|
||||
@@ -26,6 +26,8 @@ public class MassDriver extends Block{
|
||||
public int minDistribute = 10;
|
||||
public float knockback = 4f;
|
||||
public float reloadTime = 100f;
|
||||
public float bulletSpeed = 5.5f;
|
||||
public float bulletLifetime = 200f;
|
||||
public Effect shootEffect = Fx.shootBig2;
|
||||
public Effect smokeEffect = Fx.shootBigSmoke2;
|
||||
public Effect recieveEffect = Fx.mineBig;
|
||||
@@ -252,8 +254,8 @@ public class MassDriver extends Block{
|
||||
float angle = tile.angleTo(target);
|
||||
|
||||
Bullets.driverBolt.create(this, team(),
|
||||
x + Angles.trnsx(angle, translation), y + Angles.trnsy(angle, translation),
|
||||
angle, -1f, 1f, 1f, data);
|
||||
x + Angles.trnsx(angle, translation), y + Angles.trnsy(angle, translation),
|
||||
angle, -1f, bulletSpeed, bulletLifetime, data);
|
||||
|
||||
shootEffect.at(x + Angles.trnsx(angle, translation),
|
||||
y + Angles.trnsy(angle, translation), angle);
|
||||
|
||||
Reference in New Issue
Block a user