Unit wreck visuals

This commit is contained in:
Anuken
2020-07-08 23:48:12 -04:00
parent b0f69263c7
commit 29e9d064df
17 changed files with 2982 additions and 2035 deletions

View File

@@ -183,6 +183,27 @@ public class Fx{
Fill.circle(e.x, e.y, (7f - e.fin() * 7f)/2f);
}),
fallSmoke = new Effect(110, e -> {
color(Color.gray, Color.darkGray, e.rotation);
Fill.circle(e.x, e.y, e.fout() * 3.5f);
}),
unitWreck = new Effect(200f, e -> {
if(!(e.data instanceof TextureRegion)) return;
Draw.mixcol(Pal.rubble, 1f);
TextureRegion reg = e.data();
float vel = e.fin(Interp.pow5Out) * 2f * Mathf.randomSeed(e.id, 1f);
float totalRot = Mathf.randomSeed(e.id + 1, 10f);
Tmp.v1.trns(Mathf.randomSeed(e.id + 2, 360f), vel);
Draw.z(Mathf.lerp(Layer.flyingUnitLow, Layer.debris, e.fin()));
Draw.alpha(e.fout(Interp.pow5Out));
Draw.rect(reg, e.x + Tmp.v1.x, e.y + Tmp.v1.y, e.rotation - 90 + totalRot * e.fin(Interp.pow5Out));
}),
rocketSmoke = new Effect(120, e -> {
color(Color.gray);
alpha(Mathf.clamp(e.fout()*1.6f - Interp.pow3In.apply(e.rotation)*1.2f));

View File

@@ -377,6 +377,7 @@ public class UnitTypes implements ContentList{
engineOffset = 38;
engineSize = 7.3f;
hitsize = 58f;
destructibleWreck = false;
weapons.add(new Weapon(){{
y = 1.5f;