Modding:CardinalDirection
Jump to navigation
Jump to search
This represents a specific map direction
Static values
Each of these is a CardinalDirection:
- NORTH
- EAST
- SOUTH
- WEST
- WAIT (for pathfinding, route might still be calculating)
- UNKNOWN (for pathfinding, cannot route to destination)
Static methods
static CardinalDirection parseDirection(string text)
Translate a string such as "NORTH" to CardinalDirection.North
Case sensitive.
static CardinalDirection parseFromCharacter(character text)
Translate a character such as "N" to CardinalDirection.North
(Note, lua does not actually have a character type, so this is just a normal one character long string.)
Case insensitive.
Public methods
string toString()
Translates a cardinal direction object to an upper case string
CardinalDirection clockwise()
Gets the direction clockwise from this direction
CardinalDirection counterClockwise()
Gets the direction counter-clockwise from this direction