Implemented basic block explosion modeling

This commit is contained in:
Anuken
2018-04-15 15:49:50 -04:00
parent 01fc7108d8
commit 6007e511ba
21 changed files with 199 additions and 70 deletions

View File

@@ -22,7 +22,7 @@ public class TurretBullets {
public static final BulletType
basicIron = new BulletType(3f, 0) {
basicIron = new BulletType(3f, 5) {
@Override
public void draw(Bullet b) {
drawBullet(Palette.bulletYellow, Palette.bulletYellowBack,

View File

@@ -46,6 +46,29 @@ public class ExplosionFx {
Lines.lineAngle(e.x + x, e.y + y, Mathf.atan2(x, y), 1f + e.fout()*3f);
});
Draw.reset();
}),
blockExplosion = new Effect(30, e -> {
e.scaled(7, i -> {
Lines.stroke(3f * i.fout());
Lines.circle(e.x, e.y, 3f + i.fin()*10f);
});
Draw.color(Color.GRAY);
Angles.randLenVectors(e.id, 6, 2f + 19f * e.finpow(), (x, y) ->{
Fill.circle(e.x + x, e.y + y, e.fout()*3f + 0.5f);
Fill.circle(e.x + x/2f, e.y + y/2f, e.fout()*1f);
});
Draw.color(Palette.lighterOrange, Palette.lightOrange, Color.GRAY, e.fin());
Lines.stroke(1.5f * e.fout());
Angles.randLenVectors(e.id + 1, 8, 1f + 23f * e.finpow(), (x, y) -> {
Lines.lineAngle(e.x + x, e.y + y, Mathf.atan2(x, y), 1f + e.fout()*3f);
});
Draw.reset();
});
}