Added LaserTurret class / Updated bundles
This commit is contained in:
@@ -217,7 +217,7 @@ public class AmmoTypes implements ContentList{
|
||||
|
||||
spectreLaser = new AmmoType(TurretBullets.lancerLaser);
|
||||
|
||||
meltdownLaser = new AmmoType(TurretBullets.lancerLaser);
|
||||
meltdownLaser = new AmmoType(TurretBullets.meltdownLaser);
|
||||
|
||||
fuseShotgun = new AmmoType(Items.densealloy, TurretBullets.fuseShot, 1f){{
|
||||
shootEffect = Fx.none;
|
||||
|
||||
@@ -82,7 +82,7 @@ public class TurretBlocks extends BlockList implements ContentList{
|
||||
};
|
||||
}};
|
||||
|
||||
lancer = new LaserTurret("lancer"){{
|
||||
lancer = new ChargeTurret("lancer"){{
|
||||
range = 90f;
|
||||
chargeTime = 60f;
|
||||
chargeMaxDelay = 30f;
|
||||
@@ -105,7 +105,7 @@ public class TurretBlocks extends BlockList implements ContentList{
|
||||
|
||||
arc = new PowerTurret("arc"){{
|
||||
shootType = AmmoTypes.arc;
|
||||
reload = 30f;
|
||||
reload = 40f;
|
||||
shootShake = 1f;
|
||||
powerUsed = 5f;
|
||||
powerCapacity = 30f;
|
||||
@@ -218,7 +218,7 @@ public class TurretBlocks extends BlockList implements ContentList{
|
||||
ammoTypes = new AmmoType[]{AmmoTypes.bulletDenseBig, AmmoTypes.bulletPyratiteBig, AmmoTypes.bulletThoriumBig};
|
||||
reload = 4f;
|
||||
restitution = 0.1f;
|
||||
ammoUseEffect = ShootFx.shellEjectMedium;
|
||||
ammoUseEffect = ShootFx.shellEjectBig;
|
||||
range = 200f;
|
||||
inaccuracy = 4f;
|
||||
recoil = 3f;
|
||||
@@ -232,9 +232,15 @@ public class TurretBlocks extends BlockList implements ContentList{
|
||||
health = 155 * size * size;
|
||||
}};
|
||||
|
||||
meltdown = new PowerTurret("meltdown"){{
|
||||
meltdown = new LaserTurret("meltdown"){{
|
||||
shootType = AmmoTypes.meltdownLaser;
|
||||
shootCone = 40f;
|
||||
size = 4;
|
||||
powerUsed = 10f;
|
||||
range = 140f;
|
||||
reload = 60f;
|
||||
shootDuration = 60f;
|
||||
powerCapacity = 50f;
|
||||
}};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -31,7 +31,7 @@ import static io.anuke.mindustry.Vars.content;
|
||||
import static io.anuke.mindustry.Vars.world;
|
||||
|
||||
public class TurretBullets extends BulletList implements ContentList{
|
||||
public static BulletType fireball, basicFlame, lancerLaser, fuseShot, waterShot, cryoShot, lavaShot, oilShot, lightning, driverBolt, healBullet, arc;
|
||||
public static BulletType fireball, basicFlame, lancerLaser, meltdownLaser, fuseShot, waterShot, cryoShot, lavaShot, oilShot, lightning, driverBolt, healBullet, arc;
|
||||
|
||||
@Override
|
||||
public void load(){
|
||||
@@ -161,6 +161,41 @@ public class TurretBullets extends BulletList implements ContentList{
|
||||
}
|
||||
};
|
||||
|
||||
meltdownLaser = new BulletType(0.001f, 140){
|
||||
Color[] colors = {Palette.lancerLaser.cpy().mul(1f, 1f, 1f, 0.4f), Palette.lancerLaser, Color.WHITE};
|
||||
float[] tscales = {1f, 0.7f, 0.5f, 0.2f};
|
||||
float[] lenscales = {1f, 1.1f, 1.13f, 1.14f};
|
||||
float length = 100f;
|
||||
|
||||
{
|
||||
hiteffect = BulletFx.hitLancer;
|
||||
despawneffect = Fx.none;
|
||||
hitsize = 4;
|
||||
lifetime = 16f;
|
||||
pierce = true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void update(Bullet b){
|
||||
Damage.collideLine(b, b.getTeam(), hiteffect, b.x, b.y, b.angle(), length);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void draw(Bullet b){
|
||||
float baseLen = length * b.fout();
|
||||
|
||||
Lines.lineAngle(b.x, b.y, b.angle(), baseLen);
|
||||
for(int s = 0; s < 3; s++){
|
||||
Draw.color(colors[s]);
|
||||
for(int i = 0; i < tscales.length; i++){
|
||||
Lines.stroke(7f * b.fout() * (s == 0 ? 1.5f : s == 1 ? 1f : 0.3f) * tscales[i]);
|
||||
Lines.lineAngle(b.x, b.y, b.angle(), baseLen * lenscales[i]);
|
||||
}
|
||||
}
|
||||
Draw.reset();
|
||||
}
|
||||
};
|
||||
|
||||
fuseShot = new BulletType(0.01f, 70){
|
||||
int rays = 3;
|
||||
float raySpace = 2f;
|
||||
|
||||
Reference in New Issue
Block a user