Implemented fire

This commit is contained in:
Anuken
2018-04-15 17:12:09 -04:00
parent 6007e511ba
commit 3adc599278
8 changed files with 134 additions and 14 deletions
@@ -15,6 +15,7 @@ public class StorageBlocks {
vault = new Vault("vault"){{
size = 3;
health = 600;
}},
unloader = new Unloader("unloader"){{
@@ -23,6 +23,26 @@ public class EnvironmentFx {
Draw.color();
}),
fire = new Effect(35f, 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.fslope() * 1.5f);
});
Draw.color();
}),
smoke = new Effect(35f, 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.fslope() * 1.5f);
});
Draw.color();
}),
freezing = new Effect(40f, e -> {
Draw.color(Liquids.cryofluid.color);