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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user