Minor cleanup / Trail experiment

This commit is contained in:
Anuken
2020-06-27 09:20:52 -04:00
parent 0847b20401
commit 313cadb763
9 changed files with 21 additions and 21 deletions

View File

@@ -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);

View File

@@ -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);