Class Trail

java.lang.Object
mindustry.graphics.Trail

public class Trail extends Object
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected float
     
    protected float
     
    protected float
     
    protected float
     
    protected float
     
    int
     
    protected arc.struct.FloatSeq
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    Trail(int length)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
     
     
    void
    draw(arc.graphics.Color color, float width)
     
    void
    drawCap(arc.graphics.Color color, float width)
     
    void
    Removes the last point from the trail at intervals.
    int
     
    void
    update(float x, float y)
    Adds a new point to the trail at intervals.
    void
    update(float x, float y, float width)
    Adds a new point to the trail at intervals.
    float
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • length

      public int length
    • points

      protected arc.struct.FloatSeq points
    • lastX

      protected float lastX
    • lastY

      protected float lastY
    • lastAngle

      protected float lastAngle
    • counter

      protected float counter
    • lastW

      protected float lastW
  • Constructor Details

    • Trail

      public Trail(int length)
  • Method Details

    • copy

      public Trail copy()
    • width

      public float width()
    • clear

      public void clear()
    • size

      public int size()
    • drawCap

      public void drawCap(arc.graphics.Color color, float width)
    • draw

      public void draw(arc.graphics.Color color, float width)
    • shorten

      public void shorten()
      Removes the last point from the trail at intervals.
    • update

      public void update(float x, float y)
      Adds a new point to the trail at intervals.
    • update

      public void update(float x, float y, float width)
      Adds a new point to the trail at intervals.