mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-12-06 02:40:23 -08:00
Maybe the ShieldArcAbility needs a minor fix? (#9105)
* Update ShieldArcAbility.java * Update Fx.java * Update ShieldArcAbility.java * Update Fx.java * Update ShieldArcAbility.java * Update ShieldArcAbility.java * Update Fx.java * Update Fx.java * Update Fx.java...again... * Switch method
This commit is contained in:
parent
b1cb50a9cd
commit
81688f3954
2 changed files with 23 additions and 3 deletions
|
|
@ -2445,6 +2445,26 @@ public class Fx{
|
|||
Lines.poly(e.x, e.y, 6, e.rotation + e.fin());
|
||||
}).followParent(true),
|
||||
|
||||
arcShieldBreak = new Effect(40, e -> {
|
||||
Lines.stroke(3 * e.fout(), e.color);
|
||||
if(e.data instanceof Unit u){
|
||||
ShieldArcAbility ab = (ShieldArcAbility) Structs.find(u.abilities, a -> a instanceof ShieldArcAbility);
|
||||
if(ab != null){
|
||||
Vec2 pos = Tmp.v1.set(ab.x, ab.y).rotate(u.rotation - 90f).add(u);
|
||||
Lines.arc(pos.x, pos.y, ab.radius + ab.width/2, ab.angle / 360f, u.rotation + ab.angleOffset - ab.angle / 2f);
|
||||
Lines.arc(pos.x, pos.y, ab.radius - ab.width/2, ab.angle / 360f, u.rotation + ab.angleOffset - ab.angle / 2f);
|
||||
for(int i : Mathf.signs){
|
||||
float
|
||||
px = pos.x + Angles.trnsx(u.rotation + ab.angleOffset - ab.angle / 2f * i, ab.radius + ab.width / 2),
|
||||
py = pos.y + Angles.trnsy(u.rotation + ab.angleOffset - ab.angle / 2f * i, ab.radius + ab.width / 2),
|
||||
px1 = pos.x + Angles.trnsx(u.rotation + ab.angleOffset - ab.angle / 2f * i, ab.radius - ab.width / 2),
|
||||
py1 = pos.y + Angles.trnsy(u.rotation + ab.angleOffset - ab.angle / 2f * i, ab.radius - ab.width / 2);
|
||||
Lines.line(px, py, px1, py1);
|
||||
}
|
||||
}
|
||||
}
|
||||
}).followParent(true),
|
||||
|
||||
coreLandDust = new Effect(100f, e -> {
|
||||
color(e.color, e.fout(0.1f));
|
||||
rand.setSeed(e.id);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue