Implemented lightning turret
This commit is contained in:
@@ -16,6 +16,8 @@ public class AmmoTypes {
|
||||
|
||||
lancerLaser = new AmmoType(TurretBullets.lancerLaser),
|
||||
|
||||
lightning = new AmmoType(TurretBullets.lightning),
|
||||
|
||||
oil = new AmmoType(Liquids.oil, TurretBullets.oilShot, 0.3f, 1f),
|
||||
|
||||
water = new AmmoType(Liquids.water, TurretBullets.waterShot, 0.3f, 1f),
|
||||
|
||||
@@ -107,8 +107,18 @@ public class WeaponBlocks{
|
||||
heatColor = Color.RED;
|
||||
}},
|
||||
|
||||
teslaturret = new PowerTurret("teslaturret"){{
|
||||
|
||||
teslaturret = new LaserTurret("teslaturret"){{
|
||||
shootType = AmmoTypes.lightning;
|
||||
reload = 100f;
|
||||
chargeTime = 70f;
|
||||
shootShake = 1f;
|
||||
chargeMaxDelay = 30f;
|
||||
chargeEffects = 7;
|
||||
shootEffect = ShootFx.lightningShoot;
|
||||
chargeEffect = ShootFx.lancerLaserCharge;
|
||||
chargeBeginEffect = ShootFx.lancerLaserChargeBegin;
|
||||
heatColor = Color.RED;
|
||||
recoil = 3f;
|
||||
}},
|
||||
|
||||
liquidturret = new LiquidTurret("liquidturret") {{
|
||||
|
||||
@@ -173,6 +173,8 @@ public class TurretBullets {
|
||||
lightning = new BulletType(0.001f, 5) {
|
||||
{
|
||||
lifetime = 1;
|
||||
despawneffect = Fx.none;
|
||||
hiteffect = BulletFx.hitLancer;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -182,7 +184,7 @@ public class TurretBullets {
|
||||
|
||||
@Override
|
||||
public void init(Bullet b) {
|
||||
new Lightning(b.team, b, b.x, b.y, b.angle(), 30);
|
||||
new Lightning(b.team, hiteffect, damage, b.x, b.y, b.angle(), 40).add();
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -186,5 +186,16 @@ public class ShootFx {
|
||||
|
||||
Draw.color();
|
||||
Fill.circle(e.x, e.y, e.fin() * 2f);
|
||||
}),
|
||||
|
||||
lightningShoot= new Effect(12f, e -> {
|
||||
Draw.color(Color.WHITE, Palette.lancerLaser, e.fin());
|
||||
Lines.stroke(e.fout() * 1.2f + 0.5f);
|
||||
|
||||
Angles.randLenVectors(e.id, 7, 25f * e.finpow(), e.rotation, 50f, (x, y) -> {
|
||||
Lines.lineAngle(e.x + x, e.y + y, Mathf.atan2(x, y), e.fin()*5f + 2f);
|
||||
});
|
||||
|
||||
Draw.reset();
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user