Package rsb.wrappers
Class RSPath
java.lang.Object
rsb.methods.MethodProvider
rsb.wrappers.RSPath
- Direct Known Subclasses:
RSLocalPath,RSTilePath
Represents a path to walk along in game.
- Author:
- GigiaJ
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumDefines the path traversal options. -
Field Summary
Fields inherited from class rsb.methods.MethodProvider
methods -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract RSTilegetEnd()Gets the end tile of this path.abstract RSTilegetNext()Gets the next immediately available vertex in this path.abstract RSTilegetStart()Gets the start tile of this path.abstract booleanisValid()Checks whether this path can be traversed by the player.booleantraverse()Takes a step along this path if appropriate.abstract booleantraverse(EnumSet<RSPath.TraversalOption> options) Takes a step along this path if appropriate.
-
Constructor Details
-
RSPath
-
-
Method Details
-
traverse
Takes a step along this path if appropriate. If the path cannot be traversed due to the player being too far from its vertices or already at the end vertex,falsewill be returned. In all other cases,truewill be returned, but an action will not necessarily be performed (based on the given options).- Parameters:
options- Walking style options.- Returns:
trueif this path is currently valid for the player; otherwisefalse.
-
traverse
public boolean traverse()Takes a step along this path if appropriate. Specifies only TraversalOption.SPACE_ACTIONS.- Returns:
trueif this path is currently valid for the player; otherwisefalse.- See Also:
-
isValid
public abstract boolean isValid()Checks whether this path can be traversed by the player. This will be the case provided that the player near to one of its vertices, but not already standing on the end vertex.- Returns:
trueif the player can walk along this path; otherwisefalse.
-
getNext
Gets the next immediately available vertex in this path.- Returns:
- The next walkable
RSTile.
-
getStart
Gets the start tile of this path.- Returns:
- The start
RSTile.
-
getEnd
Gets the end tile of this path.- Returns:
- The end
RSTile.
-