Direction

public enum Direction(source)

Defines the (viewing) direction that an entity can have.

Entries

Link copied to clipboard

The direction upwards or direction of view "north".

Link copied to clipboard

The direction to the right or direction of view "east".

Link copied to clipboard

The direction downwards or direction of view "south".

Link copied to clipboard

The direction to the left or direction of view "west".

Properties

Link copied to clipboard
public final int dx
The x offset of the Direction.
Link copied to clipboard
public final int dy
The y offset of the Direction.

Functions

Link copied to clipboard
public int getDx()
Gets the x offset of the Direction.
Link copied to clipboard
public int getDy()
Gets the y offset of the Direction.
Link copied to clipboard
public boolean isHorizontal()
Checks whether this direction is a horizontal direction.
Link copied to clipboard
public boolean isVertical()
Checks whether this direction is a vertical direction.
Link copied to clipboard
public static Direction valueOf(String name)

Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Link copied to clipboard
public static Array<Direction> values()

Returns an array containing the constants of this enum type, in the order they're declared. This method may be used to iterate over the constants.