Improved fireballs and general block explosions

This commit is contained in:
Anuken
2018-04-15 20:06:38 -04:00
parent 3adc599278
commit cb569be3b3
9 changed files with 99 additions and 16 deletions

View File

@@ -32,6 +32,7 @@ public class LiquidBlocks {
liquidtank = new LiquidRouter("liquidtank") {{
size = 3;
liquidCapacity = 1500f;
health = 500;
}},
liquidjunction = new LiquidJunction("liquidjunction"),

View File

@@ -43,6 +43,26 @@ public class EnvironmentFx {
Draw.color();
}),
fireballsmoke = new Effect(25f, e -> {
Draw.color(Color.GRAY);
Angles.randLenVectors(e.id, 1, 2f + e.fin()*7f, (x, y) -> {
Fill.circle(e.x + x, e.y + y, 0.2f + e.fout() * 1.5f);
});
Draw.color();
}),
ballfire = new Effect(25f, e -> {
Draw.color(Palette.lightFlame, Palette.darkFlame, e.fin());
Angles.randLenVectors(e.id, 2, 2f + e.fin()*7f, (x, y) -> {
Fill.circle(e.x + x, e.y + y, 0.2f + e.fout() * 1.5f);
});
Draw.color();
}),
freezing = new Effect(40f, e -> {
Draw.color(Liquids.cryofluid.color);

View File

@@ -19,6 +19,13 @@ public class ExplosionFx {
Draw.reset();
}),
bigShockwave = new Effect(10f, 80f, e -> {
Draw.color(Color.WHITE, Color.LIGHT_GRAY, e.fin());
Lines.stroke(e.fout()*3f);
Lines.circle(e.x, e.y, e.fin()*50f);
Draw.reset();
}),
nuclearShockwave = new Effect(10f, 200f, e -> {
Draw.color(Color.WHITE, Color.LIGHT_GRAY, e.fin());
Lines.stroke(e.fout()*3f + 0.2f);
@@ -51,8 +58,8 @@ public class ExplosionFx {
blockExplosion = new Effect(30, e -> {
e.scaled(7, i -> {
Lines.stroke(3f * i.fout());
Lines.circle(e.x, e.y, 3f + i.fin()*10f);
Lines.stroke(3.1f * i.fout());
Lines.circle(e.x, e.y, 3f + i.fin()*14f);
});
Draw.color(Color.GRAY);
@@ -63,12 +70,23 @@ public class ExplosionFx {
});
Draw.color(Palette.lighterOrange, Palette.lightOrange, Color.GRAY, e.fin());
Lines.stroke(1.5f * e.fout());
Lines.stroke(1.7f * e.fout());
Angles.randLenVectors(e.id + 1, 8, 1f + 23f * e.finpow(), (x, y) -> {
Angles.randLenVectors(e.id + 1, 9, 1f + 23f * e.finpow(), (x, y) -> {
Lines.lineAngle(e.x + x, e.y + y, Mathf.atan2(x, y), 1f + e.fout()*3f);
});
Draw.reset();
}),
blockExplosionSmoke = new Effect(30, e -> {
Draw.color(Color.GRAY);
Angles.randLenVectors(e.id, 6, 4f + 30f * e.finpow(), (x, y) ->{
Fill.circle(e.x + x, e.y + y, e.fout()*3f);
Fill.circle(e.x + x/2f, e.y + y/2f, e.fout()*1f);
});
Draw.reset();
});
}