Better weapon shooting implementation

This commit is contained in:
Anuken
2022-02-23 14:29:41 -05:00
parent 08d9ff331a
commit af8268241b
7 changed files with 61 additions and 71 deletions

View File

@@ -3354,14 +3354,14 @@ public class Blocks{
targetAir = false;
shootShake = 4f;
recoilAmount = 1f;
reloadTime = 60f * 2f;
reloadTime = 60f * 2.3f;
shootLength = 7f;
rotateSpeed = 1.4f;
minWarmup = 0.85f;
shootWarmupSpeed = 0.07f;
coolant = consume(new ConsumeLiquid(Liquids.water, 30f / 60f));
coolantMultiplier = 2.5f;
coolantMultiplier = 1.5f;
draw = new DrawTurret("reinforced-"){{
parts.addAll(

View File

@@ -1515,7 +1515,7 @@ public class Fx{
color(Color.white, e.color, e.fin());
rand.setSeed(e.id);
for(int i = 0; i < 10; i++){
for(int i = 0; i < 8; i++){
float rot = e.rotation + rand.range(22f);
v.trns(rot, rand.random(e.finpow() * 24f));
Fill.poly(e.x + v.x, e.y + v.y, 4, e.fout() * 3.8f + 0.2f, rand.random(360f));

View File

@@ -479,7 +479,7 @@ public class UnitTypes{
despawnEffect = Fx.smokeCloud;
smokeEffect = Fx.none;
shootEffect = Fx.greenLaserChargeSmall;
chargeEffect = Fx.greenLaserChargeSmall;
incendChance = 0.1f;
incendSpread = 5f;
@@ -566,7 +566,7 @@ public class UnitTypes{
largeHit = true;
lightColor = lightningColor = Pal.heal;
shootEffect = Fx.greenLaserCharge;
chargeEffect = Fx.greenLaserCharge;
healPercent = 25f;
collidesTeam = true;
@@ -1209,7 +1209,7 @@ public class UnitTypes{
shadow = 7f;
rotate = true;
recoil = 0.5f;
shootY = 7.25f;
bullet = fragBullet;
}},
new Weapon("large-artillery"){{
@@ -1222,6 +1222,7 @@ public class UnitTypes{
shootSound = Sounds.shoot;
rotate = true;
shadow = 12f;
shootY = 7.25f;
bullet = fragBullet;
}});
}};
@@ -2481,6 +2482,8 @@ public class UnitTypes{
heatColor = Color.valueOf("f9350f");
cooldownTime = 30f;
shots = 2;
bullet = new BasicBulletType(5f, 50){{
sprite = "missile-large";
smokeEffect = Fx.shootBigSmoke;
@@ -2887,11 +2890,11 @@ public class UnitTypes{
x = 43 / 4f;
y = -20f / 4f;
shootY = 39 / 4f;
shootY = 37 / 4f;
shootX = -5f / 4f;
recoil = 3f;
reload = 30f;
shake = 3f;
shake = 2f;
cooldownTime = 20f;
layerOffset = 0.02f;