hitColor colored beam effects. (#3471)

* hitColor colored beam effects.

* Same with lasers

* fix
This commit is contained in:
MEEP of Faith
2021-01-19 14:46:02 -08:00
committed by GitHub
parent 532a4bc140
commit c53a6a7c04
3 changed files with 23 additions and 2 deletions

View File

@@ -418,6 +418,16 @@ public class Fx{
Fill.circle(e.x + x, e.y + y, e.fout() * 2f); Fill.circle(e.x + x, e.y + y, e.fout() * 2f);
}); });
}), }),
hitLaserBlast = new Effect(12, e -> {
color(e.color);
stroke(e.fout() * 1.5f);
randLenVectors(e.id, 8, e.finpow() * 17f, e.rotation, 360f, (x, y) -> {
float ang = Mathf.angle(x, y);
lineAngle(e.x + x, e.y + y, ang, e.fout() * 4 + 1f);
});
}),
hitLancer = new Effect(12, e -> { hitLancer = new Effect(12, e -> {
color(Color.white); color(Color.white);
@@ -429,6 +439,16 @@ public class Fx{
}); });
}), }),
hitBeam = new Effect(12, e -> {
color(e.color);
stroke(e.fout() * 2f);
randLenVectors(e.id, 6, e.finpow() * 18f, e.rotation, 360f, (x, y) -> {
float ang = Mathf.angle(x, y);
lineAngle(e.x + x, e.y + y, ang, e.fout() * 4 + 1f);
});
}),
hitMeltdown = new Effect(12, e -> { hitMeltdown = new Effect(12, e -> {
color(Pal.meltdownHit); color(Pal.meltdownHit);
stroke(e.fout() * 2f); stroke(e.fout() * 2f);

View File

@@ -25,7 +25,7 @@ public class ContinuousLaserBulletType extends BulletType{
public ContinuousLaserBulletType(float damage){ public ContinuousLaserBulletType(float damage){
super(0.001f, damage); super(0.001f, damage);
hitEffect = Fx.hitMeltdown; hitEffect = Fx.hitBeam;
despawnEffect = Fx.none; despawnEffect = Fx.none;
hitSize = 4; hitSize = 4;
drawSize = 420f; drawSize = 420f;

View File

@@ -23,7 +23,8 @@ public class LaserBulletType extends BulletType{
public LaserBulletType(float damage){ public LaserBulletType(float damage){
super(0.01f, damage); super(0.01f, damage);
hitEffect = Fx.hitLancer; hitEffect = Fx.hitLaserBlast;
hitColor = colors[2];
despawnEffect = Fx.none; despawnEffect = Fx.none;
shootEffect = Fx.hitLancer; shootEffect = Fx.hitLancer;
smokeEffect = Fx.none; smokeEffect = Fx.none;