Class WaypointQueue

java.lang.Object
dev.narlyx.tweetybird.WaypointQueue

public class WaypointQueue extends Object
Tracks and queues all waypoints internally for TweetyBird
  • Constructor Details

    • WaypointQueue

      public WaypointQueue(TweetyBird tweetyBird)
      Constructor
      Parameters:
      tweetyBird - Parent
  • Method Details

    • addWaypoint

      public void addWaypoint(Waypoint waypoint)
      Adds a new waypoint to the end of the queue
      Parameters:
      waypoint - New waypoint to be added
    • increment

      public void increment()
      Moves on to the next waypoint in queue
    • clear

      public void clear()
      Clears out all waypoints accept for the current index
    • getIndex

      public int getIndex()
      Returns the current index
      Returns:
      Current index
    • getSize

      public int getSize()
      Returns the size of the queue
      Returns:
      Size of queue
    • getCurrentWaypoint

      public Waypoint getCurrentWaypoint()
      Returns the waypoint under the current index
      Returns:
      Current waypoint
    • getWaypoint

      public Waypoint getWaypoint(int index)
      Returns a specific waypoint with a custom index
      Parameters:
      index - Target waypoint index
      Returns:
      Target waypoint
    • getUpdated

      public boolean getUpdated()
      Returns weather or not the queue was updated since the last query
      Returns:
      Updated since last query bool