Slightly more functional unit commands

This commit is contained in:
Anuken
2022-02-08 19:29:23 -05:00
parent f9efbb6686
commit d1eae2d1a2
5 changed files with 190 additions and 27 deletions

View File

@@ -119,7 +119,10 @@ public class Drawf{
}
public static void dashLine(Color color, float x, float y, float x2, float y2){
int segments = (int)(Math.max(Math.abs(x - x2), Math.abs(y - y2)) / tilesize * 2);
dashLine(color, x, y, x2, y2, (int)(Math.max(Math.abs(x - x2), Math.abs(y - y2)) / tilesize * 2));
}
public static void dashLine(Color color, float x, float y, float x2, float y2, int segments){
Lines.stroke(3f);
Draw.color(Pal.gray, color.a);
Lines.dashLine(x, y, x2, y2, segments);
@@ -128,6 +131,15 @@ public class Drawf{
Draw.reset();
}
public static void line(Color color, float x, float y, float x2, float y2){
Lines.stroke(3f);
Draw.color(Pal.gray, color.a);
Lines.line(x, y, x2, y2);
Lines.stroke(1f, color);
Lines.line(x, y, x2, y2);
Draw.reset();
}
public static void dashLineBasic(float x, float y, float x2, float y2){
Lines.dashLine(x, y, x2, y2, (int)(Math.max(Math.abs(x - x2), Math.abs(y - y2)) / tilesize * 2));
}