Minor cleanup / Trail experiment
This commit is contained in:
@@ -153,7 +153,7 @@ public class OverlayRenderer{
|
||||
Draw.reset();
|
||||
|
||||
Building tile = world.entWorld(v.x, v.y);
|
||||
if(tile != null && tile.interactable(player.team()) && tile.acceptStack(player.unit().item(), player.unit().stack().amount, player.unit()) > 0){
|
||||
if(tile != null && tile.interactable(player.team()) && tile.acceptStack(player.unit().item(), player.unit().stack.amount, player.unit()) > 0){
|
||||
Lines.stroke(3f, Pal.gray);
|
||||
Lines.square(tile.x(), tile.y(), tile.block().size * tilesize / 2f + 3 + Mathf.absin(Time.time(), 5f, 1f));
|
||||
Lines.stroke(1f, Pal.place);
|
||||
|
||||
@@ -8,10 +8,15 @@ import arc.struct.*;
|
||||
import arc.util.pooling.*;
|
||||
|
||||
public class Trail{
|
||||
private static final int length = 20;
|
||||
private Seq<Vec3> points = new Seq<>();
|
||||
private final int length;
|
||||
private final Seq<Vec3> points;
|
||||
private float lastX = -1, lastY = -1;
|
||||
|
||||
public Trail(int length){
|
||||
this.length = length;
|
||||
points = new Seq<>(length);
|
||||
}
|
||||
|
||||
public void draw(Color color, float width){
|
||||
Draw.color(color);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user