1
0
mirror of https://github.com/Anuken/Mindustry.git synced 2024-11-11 14:56:10 +03:00

Force projection disappearing visuals (#4504)

* forceShrink

* forceShrink

* more quicker to tell it apart from a shield down
This commit is contained in:
Sunny Kim 2021-02-08 02:36:29 +09:00 committed by GitHub
parent 3bb85b4bda
commit 2107af1f0f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 15 additions and 0 deletions

View File

@ -723,6 +723,19 @@ public class Fx{
stroke(2f * e.fout());
Lines.circle(e.x, e.y, 5f * e.fout());
}),
forceShrink = new Effect(30, e -> {
color(e.color, e.fout());
if(Core.settings.getBool("animatedshields")){
Fill.poly(e.x, e.y, 6, e.rotation * e.fout());
}else{
stroke(1.5f);
Draw.alpha(0.09f);
Fill.poly(e.x, e.y, 6, e.rotation * e.fout());
Draw.alpha(1f);
Lines.poly(e.x, e.y, 6, e.rotation * e.fout());
}
}).layer(Layer.shields),
flakExplosionBig = new Effect(30, e -> {
color(Pal.bulletYellowBack);

View File

@ -117,6 +117,8 @@ public class ForceProjector extends Block{
@Override
public void onRemoved(){
float radius = realRadius();
if(!broken && radius > 1f) Fx.forceShrink.at(x, y, radius, team.color);
super.onRemoved();
drawer.remove();
}