Various prototypes

This commit is contained in:
Anuken
2020-04-15 12:44:53 -04:00
parent 51226d6c88
commit 0eaf9bc9c6
15 changed files with 2985 additions and 2730 deletions

View File

@@ -844,17 +844,20 @@ public abstract class InputHandler implements InputProcessor, GestureListener{
}
public void drawArrow(Block block, int x, int y, int rotation, boolean valid){
float trns = (block.size / 2) * tilesize;
int dx = Geometry.d4(rotation).x, dy = Geometry.d4(rotation).y;
Draw.color(!valid ? Pal.removeBack : Pal.accentBack);
Draw.rect(Core.atlas.find("place-arrow"),
x * tilesize + block.offset(),
y * tilesize + block.offset() - 1,
x * tilesize + block.offset() + dx*trns,
y * tilesize + block.offset() - 1 + dy*trns,
Core.atlas.find("place-arrow").getWidth() * Draw.scl,
Core.atlas.find("place-arrow").getHeight() * Draw.scl, rotation * 90 - 90);
Draw.color(!valid ? Pal.remove : Pal.accent);
Draw.rect(Core.atlas.find("place-arrow"),
x * tilesize + block.offset(),
y * tilesize + block.offset(),
x * tilesize + block.offset() + dx*trns,
y * tilesize + block.offset() + dy*trns,
Core.atlas.find("place-arrow").getWidth() * Draw.scl,
Core.atlas.find("place-arrow").getHeight() * Draw.scl, rotation * 90 - 90);
}