Slightly more functional unit commands
This commit is contained in:
@@ -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));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user