Fixed casing eject effects

This commit is contained in:
Anuken
2020-10-31 20:19:24 -04:00
parent b5e2812d0b
commit 54ba4b31a1
7 changed files with 103 additions and 67 deletions

View File

@@ -1404,7 +1404,7 @@ public class Blocks implements ContentList{
restitution = 0.03f;
range = 100;
shootCone = 15f;
ammoUseEffect = Fx.shellEjectSmall;
ammoUseEffect = Fx.casing1;
health = 250;
inaccuracy = 2f;
rotateSpeed = 10f;
@@ -1593,7 +1593,7 @@ public class Blocks implements ContentList{
shootShake = 1f;
burstSpacing = 3f;
shots = 4;
ammoUseEffect = Fx.shellEjectBig;
ammoUseEffect = Fx.casing2;
health = 240 * size * size;
shootSound = Sounds.shootBig;
}};
@@ -1687,7 +1687,7 @@ public class Blocks implements ContentList{
inaccuracy = 12f;
reloadTime = 60f;
ammoEjectBack = 5f;
ammoUseEffect = Fx.shellEjectBig;
ammoUseEffect = Fx.casing3Double;
ammoPerShot = 2;
cooldown = 0.03f;
velocityInaccuracy = 0.2f;
@@ -1745,7 +1745,7 @@ public class Blocks implements ContentList{
rotateSpeed = 2.5f;
reloadTime = 200f;
restitution = 0.2f;
ammoUseEffect = Fx.shellEjectBig;
ammoUseEffect = Fx.casing3Double;
recoilAmount = 5f;
restitution = 0.009f;
cooldown = 0.009f;
@@ -1774,7 +1774,7 @@ public class Blocks implements ContentList{
reloadTime = 6f;
coolantMultiplier = 0.5f;
restitution = 0.1f;
ammoUseEffect = Fx.shellEjectBig;
ammoUseEffect = Fx.casing3Double;
range = 200f;
inaccuracy = 3f;
recoilAmount = 3f;

View File

@@ -1064,68 +1064,102 @@ public class Fx{
}),
shellEjectSmall = new Effect(30f, e -> {
casing1 = new Effect(30f, e -> {
color(Pal.lightOrange, Color.lightGray, Pal.lightishGray, e.fin());
alpha(e.fout(0.2f));
alpha(e.fout(0.3f));
float rot = Math.abs(e.rotation) + 90f;
int i = -Mathf.sign(e.rotation);
float len = (2f + e.finpow() * 6f) * i;
float lr = rot + e.fin() * 30f * i;
Fill.rect(e.x + trnsx(lr, len) + Mathf.randomSeedRange(e.id + i + 7, 3f * e.fin()),
Fill.rect(
e.x + trnsx(lr, len) + Mathf.randomSeedRange(e.id + i + 7, 3f * e.fin()),
e.y + trnsy(lr, len) + Mathf.randomSeedRange(e.id + i + 8, 3f * e.fin()),
1f, 2f, rot + e.fin() * 50f * i);
1f, 2f, rot + e.fin() * 50f * i
);
}).layer(Layer.debris, 400f),
}).layer(Layer.bullet),
shellEjectMedium = new Effect(34f, e -> {
casing2 = new Effect(34f, e -> {
color(Pal.lightOrange, Color.lightGray, Pal.lightishGray, e.fin());
alpha(e.fout(0.5f));
float rot = Math.abs(e.rotation) + 90f;
int i = Mathf.sign(e.rotation);
//for(int i : Mathf.signs){
int i = -Mathf.sign(e.rotation);
float len = (2f + e.finpow() * 10f) * i;
float lr = rot + e.fin() * 20f * i;
rect(Core.atlas.find("casing"),
e.x + trnsx(lr, len) + Mathf.randomSeedRange(e.id + i + 7, 3f * e.fin()),
e.y + trnsy(lr, len) + Mathf.randomSeedRange(e.id + i + 8, 3f * e.fin()),
2f, 3f, rot + e.fin() * 50f * i
);
}).layer(Layer.bullet),
casing3 = new Effect(40f, e -> {
color(Pal.lightOrange, Pal.lightishGray, Pal.lightishGray, e.fin());
alpha(e.fout(0.5f));
float rot = Math.abs(e.rotation) + 90f;
int i = -Mathf.sign(e.rotation);
float len = (4f + e.finpow() * 9f) * i;
float lr = rot + Mathf.randomSeedRange(e.id + i + 6, 20f * e.fin()) * i;
rect(Core.atlas.find("casing"),
e.x + trnsx(lr, len) + Mathf.randomSeedRange(e.id + i + 7, 3f * e.fin()),
e.y + trnsy(lr, len) + Mathf.randomSeedRange(e.id + i + 8, 3f * e.fin()),
2.5f, 4f,
rot + e.fin() * 50f * i
);
}).layer(Layer.bullet),
casing4 = new Effect(45f, e -> {
color(Pal.lightOrange, Pal.lightishGray, Pal.lightishGray, e.fin());
alpha(e.fout(0.5f));
float rot = Math.abs(e.rotation) + 90f;
int i = -Mathf.sign(e.rotation);
float len = (4f + e.finpow() * 9f) * i;
float lr = rot + Mathf.randomSeedRange(e.id + i + 6, 20f * e.fin()) * i;
rect(Core.atlas.find("casing"),
e.x + trnsx(lr, len) + Mathf.randomSeedRange(e.id + i + 7, 3f * e.fin()),
e.y + trnsy(lr, len) + Mathf.randomSeedRange(e.id + i + 8, 3f * e.fin()),
3f, 6f,
rot + e.fin() * 50f * i
);
}).layer(Layer.bullet),
casing2Double = new Effect(34f, e -> {
color(Pal.lightOrange, Color.lightGray, Pal.lightishGray, e.fin());
alpha(e.fout(0.5f));
float rot = Math.abs(e.rotation) + 90f;
for(int i : Mathf.signs){
float len = (2f + e.finpow() * 10f) * i;
float lr = rot + e.fin() * 20f * i;
rect(Core.atlas.find("casing"),
e.x + trnsx(lr, len) + Mathf.randomSeedRange(e.id + i + 7, 3f * e.fin()),
e.y + trnsy(lr, len) + Mathf.randomSeedRange(e.id + i + 8, 3f * e.fin()),
2f, 3f, rot);
//}
2f, 3f, rot + e.fin() * 50f * i
);
}
color(Color.lightGray, Color.gray, e.fin());
}).layer(Layer.bullet),
//for(int i : Mathf.signs){
float ex = e.x, ey = e.y, fout = e.fout();
randLenVectors(e.id, 4, 1f + e.finpow() * 11f, e.rotation + 90f * i, 20f, (x, y) -> {
Fill.circle(ex + x, ey + y, fout * 1.5f);
});
//}
casing3Double = new Effect(40f, e -> {
color(Pal.lightOrange, Pal.lightishGray, Pal.lightishGray, e.fin());
alpha(e.fout(0.5f));
float rot = Math.abs(e.rotation) + 90f;
}).layer(Layer.debris, 400f),
shellEjectBig = new Effect(22f, e -> {
color(Pal.lightOrange, Color.lightGray, Pal.lightishGray, e.fin());
float rot = e.rotation + 90f;
for(int i : Mathf.signs){
float len = (4f + e.finpow() * 8f) * i;
float len = (4f + e.finpow() * 9f) * i;
float lr = rot + Mathf.randomSeedRange(e.id + i + 6, 20f * e.fin()) * i;
rect(Core.atlas.find("casing"),
e.x + trnsx(lr, len) + Mathf.randomSeedRange(e.id + i + 7, 3f * e.fin()),
e.y + trnsy(lr, len) + Mathf.randomSeedRange(e.id + i + 8, 3f * e.fin()),
2.5f, 4f,
rot + e.fin() * 30f * i + Mathf.randomSeedRange(e.id + i + 9, 40f * e.fin()));
rot + e.fin() * 50f * i
);
}
color(Color.lightGray);
for(int i : Mathf.signs){
float ex = e.x, ey = e.y, fout = e.fout();
randLenVectors(e.id, 4, -e.finpow() * 15f, e.rotation + 90f * i, 25f, (x, y) -> {
Fill.circle(ex + x, ey + y, fout * 2f);
});
}
}).layer(Layer.debris, 400f),
}).layer(Layer.bullet),
railShoot = new Effect(24f, e -> {
e.scaled(10f, b -> {

View File

@@ -74,7 +74,7 @@ public class UnitTypes implements ContentList{
x = 4f;
y = 2f;
top = false;
ejectEffect = Fx.shellEjectSmall;
ejectEffect = Fx.casing1;
bullet = Bullets.standardCopper;
}});
}};
@@ -126,7 +126,7 @@ public class UnitTypes implements ContentList{
reload = 60f;
recoil = 4f;
shake = 2f;
ejectEffect = Fx.shellEjectMedium;
ejectEffect = Fx.casing2;
shootSound = Sounds.artillery;
bullet = new ArtilleryBulletType(2f, 8, "shell"){{
hitEffect = Fx.blastExplosion;
@@ -165,7 +165,7 @@ public class UnitTypes implements ContentList{
reload = 45f;
recoil = 5f;
shake = 2f;
ejectEffect = Fx.shellEjectBig;
ejectEffect = Fx.casing3;
shootSound = Sounds.artillery;
shots = 3;
inaccuracy = 3f;
@@ -189,7 +189,7 @@ public class UnitTypes implements ContentList{
x = 8.5f;
y = 6f;
rotate = true;
ejectEffect = Fx.shellEjectSmall;
ejectEffect = Fx.casing1;
bullet = Bullets.standardCopper;
}},
new Weapon("mount-weapon"){{
@@ -197,7 +197,7 @@ public class UnitTypes implements ContentList{
x = 8.5f;
y = -7f;
rotate = true;
ejectEffect = Fx.shellEjectSmall;
ejectEffect = Fx.casing1;
bullet = Bullets.standardCopper;
}}
@@ -225,7 +225,7 @@ public class UnitTypes implements ContentList{
reload = 9f;
recoil = 5f;
shake = 2f;
ejectEffect = Fx.shellEjectBig;
ejectEffect = Fx.casing4;
shootSound = Sounds.artillery;
bullet = new BasicBulletType(13f, 60){{
@@ -737,7 +737,7 @@ public class UnitTypes implements ContentList{
reload = 45;
shake = 3f;
rotateSpeed = 2f;
ejectEffect = Fx.shellEjectSmall;
ejectEffect = Fx.casing1;
shootSound = Sounds.shootBig;
rotate = true;
occlusion = 8f;
@@ -803,7 +803,7 @@ public class UnitTypes implements ContentList{
reload = 30;
shake = 4f;
rotateSpeed = 2f;
ejectEffect = Fx.shellEjectSmall;
ejectEffect = Fx.casing1;
shootSound = Sounds.shootBig;
rotate = true;
occlusion = 12f;
@@ -835,7 +835,7 @@ public class UnitTypes implements ContentList{
shake = 10f;
recoil = 10f;
rotateSpeed = 1f;
ejectEffect = Fx.shellEjectBig;
ejectEffect = Fx.casing3;
shootSound = Sounds.shootBig;
rotate = true;
occlusion = 30f;
@@ -901,7 +901,7 @@ public class UnitTypes implements ContentList{
y = 0f;
x = 2f;
reload = 13f;
ejectEffect = Fx.shellEjectSmall;
ejectEffect = Fx.casing1;
bullet = Bullets.standardCopper;
shootSound = Sounds.shoot;
}});
@@ -1023,7 +1023,7 @@ public class UnitTypes implements ContentList{
y = 8f;
x = 17f;
reload = 20f;
ejectEffect = Fx.shellEjectSmall;
ejectEffect = Fx.casing1;
rotateSpeed = 8f;
bullet = missiles;
shootSound = Sounds.shoot;
@@ -1035,7 +1035,7 @@ public class UnitTypes implements ContentList{
x = 17f;
reload = 35;
rotateSpeed = 8f;
ejectEffect = Fx.shellEjectSmall;
ejectEffect = Fx.casing1;
bullet = missiles;
shootSound = Sounds.shoot;
rotate = true;
@@ -1048,7 +1048,7 @@ public class UnitTypes implements ContentList{
reload = 12;
shake = 1f;
rotateSpeed = 2f;
ejectEffect = Fx.shellEjectSmall;
ejectEffect = Fx.casing1;
shootSound = Sounds.shootBig;
rotate = true;
occlusion = 8f;
@@ -1129,7 +1129,7 @@ public class UnitTypes implements ContentList{
y = -13f;
x = 20f;
reload = 12f;
ejectEffect = Fx.shellEjectSmall;
ejectEffect = Fx.casing1;
rotateSpeed = 7f;
shake = 1f;
shootSound = Sounds.shoot;
@@ -1362,7 +1362,7 @@ public class UnitTypes implements ContentList{
shootY = 4f;
y = 1.5f;
rotate = true;
ejectEffect = Fx.shellEjectSmall;
ejectEffect = Fx.casing1;
bullet = Bullets.standardCopper;
}});
@@ -1372,7 +1372,7 @@ public class UnitTypes implements ContentList{
x = 0f;
y = -5f;
rotate = true;
ejectEffect = Fx.shellEjectSmall;
ejectEffect = Fx.casing1;
bullet = new MissileBulletType(2.7f, 12, "missile"){{
width = 8f;
height = 8f;
@@ -1418,7 +1418,7 @@ public class UnitTypes implements ContentList{
rotate = true;
rotateSpeed = 5f;
inaccuracy = 10f;
ejectEffect = Fx.shellEjectSmall;
ejectEffect = Fx.casing1;
bullet = Bullets.flakLead;
}});
@@ -1430,7 +1430,7 @@ public class UnitTypes implements ContentList{
inaccuracy = 2f;
rotateSpeed = 2f;
shake = 1.5f;
ejectEffect = Fx.shellEjectMedium;
ejectEffect = Fx.casing2;
bullet = Bullets.artilleryIncendiary;
}});
}};
@@ -1466,7 +1466,7 @@ public class UnitTypes implements ContentList{
shots = 1;
inaccuracy = 3f;
ejectEffect = Fx.shellEjectBig;
ejectEffect = Fx.casing3;
bullet = new ArtilleryBulletType(3.2f, 12){{
trailMult = 0.8f;
@@ -1599,7 +1599,7 @@ public class UnitTypes implements ContentList{
shake = 2f;
recoil = 3f;
occlusion = 12f;
ejectEffect = Fx.shellEjectBig;
ejectEffect = Fx.casing3;
shots = 3;
shotDelay = 4f;