Misc fixes

This commit is contained in:
Anuken
2022-09-01 08:57:43 -04:00
parent 56856c8166
commit 2d47ff893b
3 changed files with 19 additions and 21 deletions

View File

@@ -101,25 +101,20 @@ public class ShieldArcAbility extends Ability{
Draw.color(unit.team.color, Color.white, Mathf.clamp(alpha));
var pos = paramPos.set(x, y).rotate(unit.rotation - 90f).add(unit);
if(Vars.renderer.animateShields){
if(region != null){
Vec2 rp = offsetRegion ? pos : Tmp.v1.set(unit);
Draw.yscl = widthScale;
Draw.rect(region, rp.x, rp.y, unit.rotation - 90);
Draw.yscl = 1f;
}
if(!Vars.renderer.animateShields){
Draw.alpha(0.4f);
}
if(drawArc){
Lines.stroke(width * widthScale);
Lines.arc(pos.x, pos.y, radius, angle / 360f, unit.rotation + angleOffset - angle / 2f);
}
}else{
//TODO
Lines.stroke(1.5f);
Draw.alpha(0.09f);
Fill.poly(pos.x, pos.y, 6, radius);
Draw.alpha(1f);
Lines.poly(pos.x, pos.y, 6, radius);
if(region != null){
Vec2 rp = offsetRegion ? pos : Tmp.v1.set(unit);
Draw.yscl = widthScale;
Draw.rect(region, rp.x, rp.y, unit.rotation - 90);
Draw.yscl = 1f;
}
if(drawArc){
Lines.stroke(width * widthScale);
Lines.arc(pos.x, pos.y, radius, angle / 360f, unit.rotation + angleOffset - angle / 2f);
}
Draw.reset();
}