Commandable blocks

This commit is contained in:
Anuken
2022-02-17 16:19:07 -05:00
parent 49a39d42e7
commit 9f3af412f0
12 changed files with 177 additions and 16 deletions

View File

@@ -118,6 +118,13 @@ public class Drawf{
Draw.z(pz);
}
public static void limitLine(Position start, Position dest, float len1, float len2){
Tmp.v1.set(dest).sub(start).setLength(len1);
Tmp.v2.set(Tmp.v1).scl(-1f).setLength(len2);
Drawf.line(Pal.accent, start.getX() + Tmp.v1.x, start.getY() + Tmp.v1.y, dest.getX() + Tmp.v2.x, dest.getY() + Tmp.v2.y);
}
public static void dashLineDst(Color color, float x, float y, float x2, float y2){
dashLine(color, x, y, x2, y2, (int)(Mathf.dst(x, y, x2, y2) / tilesize * 1.6f));
}