Line optimization & cleanup
This commit is contained in:
@@ -150,15 +150,14 @@ public class Drawf{
|
||||
}
|
||||
|
||||
public static void laser(Team team, TextureRegion line, TextureRegion edge, float x, float y, float x2, float y2, float rotation, float scale){
|
||||
Tmp.v1.trns(rotation, 8f * scale * Draw.scl);
|
||||
float scl = 8f * scale * Draw.scl;
|
||||
float vx = Mathf.cosDeg(rotation) * scl, vy = Mathf.sinDeg(rotation) * scl;
|
||||
|
||||
Draw.rect(edge, x, y, edge.width * scale * Draw.scl, edge.height * scale * Draw.scl, rotation + 180);
|
||||
Draw.rect(edge, x2, y2, edge.width * scale * Draw.scl, edge.height * scale * Draw.scl, rotation);
|
||||
|
||||
Lines.stroke(12f * scale);
|
||||
Lines.precise(true);
|
||||
Lines.line(line, x + Tmp.v1.x, y + Tmp.v1.y, x2 - Tmp.v1.x, y2 - Tmp.v1.y, false, 0f);
|
||||
Lines.precise(false);
|
||||
Lines.line(line, x + vx, y + vy, x2 - vx, y2 - vy, false);
|
||||
Lines.stroke(1f);
|
||||
|
||||
light(team, x, y, x2, y2);
|
||||
|
||||
Reference in New Issue
Block a user