Package dev.narlyx.tweetybird
Class WaypointQueue
java.lang.Object
dev.narlyx.tweetybird.WaypointQueue
Tracks and queues all waypoints internally for TweetyBird
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addWaypoint
(Waypoint waypoint) Adds a new waypoint to the end of the queuevoid
clear()
Clears out all waypoints accept for the current indexReturns the waypoint under the current indexint
getIndex()
Returns the current indexint
getSize()
Returns the size of the queueboolean
Returns weather or not the queue was updated since the last querygetWaypoint
(int index) Returns a specific waypoint with a custom indexvoid
Moves on to the next waypoint in queue
-
Constructor Details
-
WaypointQueue
Constructor- Parameters:
tweetyBird
- Parent
-
-
Method Details
-
addWaypoint
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
Returns the waypoint under the current index- Returns:
- Current waypoint
-
getWaypoint
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
-