From c53a6a7c04a8da80f0cd21de4812154ba8e14bcf Mon Sep 17 00:00:00 2001 From: MEEP of Faith <54301439+MEEPofFaith@users.noreply.github.com> Date: Tue, 19 Jan 2021 14:46:02 -0800 Subject: [PATCH] hitColor colored beam effects. (#3471) * hitColor colored beam effects. * Same with lasers * fix --- core/src/mindustry/content/Fx.java | 20 +++++++++++++++++++ .../bullet/ContinuousLaserBulletType.java | 2 +- .../entities/bullet/LaserBulletType.java | 3 ++- 3 files changed, 23 insertions(+), 2 deletions(-) diff --git a/core/src/mindustry/content/Fx.java b/core/src/mindustry/content/Fx.java index 7edc5d5cc3..b2f21d732d 100644 --- a/core/src/mindustry/content/Fx.java +++ b/core/src/mindustry/content/Fx.java @@ -418,6 +418,16 @@ public class Fx{ 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 -> { 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 -> { color(Pal.meltdownHit); stroke(e.fout() * 2f); diff --git a/core/src/mindustry/entities/bullet/ContinuousLaserBulletType.java b/core/src/mindustry/entities/bullet/ContinuousLaserBulletType.java index 9edcdb0a5c..43113a0a99 100644 --- a/core/src/mindustry/entities/bullet/ContinuousLaserBulletType.java +++ b/core/src/mindustry/entities/bullet/ContinuousLaserBulletType.java @@ -25,7 +25,7 @@ public class ContinuousLaserBulletType extends BulletType{ public ContinuousLaserBulletType(float damage){ super(0.001f, damage); - hitEffect = Fx.hitMeltdown; + hitEffect = Fx.hitBeam; despawnEffect = Fx.none; hitSize = 4; drawSize = 420f; diff --git a/core/src/mindustry/entities/bullet/LaserBulletType.java b/core/src/mindustry/entities/bullet/LaserBulletType.java index ab6cd9dce1..1a9a92a139 100644 --- a/core/src/mindustry/entities/bullet/LaserBulletType.java +++ b/core/src/mindustry/entities/bullet/LaserBulletType.java @@ -23,7 +23,8 @@ public class LaserBulletType extends BulletType{ public LaserBulletType(float damage){ super(0.01f, damage); - hitEffect = Fx.hitLancer; + hitEffect = Fx.hitLaserBlast; + hitColor = colors[2]; despawnEffect = Fx.none; shootEffect = Fx.hitLancer; smokeEffect = Fx.none;