C# Класс NetMud.Cartography.Utilities

General utilities for map rendering and parsing
Показать файл Открыть проект

Открытые методы

Метод Описание
CalculateMovementDistance ( int degreesFromNorth, int distance ) : int>.Tuple

Calculates the x,y distance per move

GetDirectionStep ( MovementDirectionType transversalDirection ) : Tuple

X, Y, Z

GetOpposingRoom ( IRoomData origin, MovementDirectionType direction ) : IRoomData

Gets the opposite room from the origin based on direction

IsOutOfBounds ( Tuple boundings, long map ) : bool

Is this coordinate out of bounds of the map

IsOutOfBounds ( int>.Tuple boundings, long map ) : bool

Is this coordinate out of bounds of the map

ReverseDirection ( MovementDirectionType direction ) : MovementDirectionType
TranslateDirectionToAsciiCharacter ( MovementDirectionType direction ) : string

Translates hard directions to ascii characters. UP inclines are always brackets open to the left, DOWN is always bracket open to the right

TranslateDirectionToDegrees ( MovementDirectionType direction ) : int>.Tuple

Translates direction words into degreesFromNorth and inclineGrade for pathways, returns the absolute default value

TranslateToDirection ( int degreesFromNorth, int inclineGrade, bool reverse = false ) : MovementDirectionType

Translates degreesFromNorth into direction words for pathways

Описание методов

CalculateMovementDistance() публичный статический Метод

Calculates the x,y distance per move
public static CalculateMovementDistance ( int degreesFromNorth, int distance ) : int>.Tuple
degreesFromNorth int what direction you're moving in
distance int how far you're trying to move
Результат int>.Tuple

GetDirectionStep() публичный статический Метод

X, Y, Z
public static GetDirectionStep ( MovementDirectionType transversalDirection ) : Tuple
transversalDirection MovementDirectionType The direction being faced
Результат Tuple

GetOpposingRoom() публичный статический Метод

Gets the opposite room from the origin based on direction
public static GetOpposingRoom ( IRoomData origin, MovementDirectionType direction ) : IRoomData
origin IRoomData The room we're looking to oppose
direction MovementDirectionType The direction the room would be in (this method will reverse the direction itself)
Результат IRoomData

IsOutOfBounds() публичный статический Метод

Is this coordinate out of bounds of the map
public static IsOutOfBounds ( Tuple boundings, long map ) : bool
boundings Tuple a 3d coordinate x,y,z
map long the 3d map in question
Результат bool

IsOutOfBounds() публичный статический Метод

Is this coordinate out of bounds of the map
public static IsOutOfBounds ( int>.Tuple boundings, long map ) : bool
boundings int>.Tuple a 2d coordinate x,y,z
map long the 2d map in question
Результат bool

ReverseDirection() публичный статический Метод

public static ReverseDirection ( MovementDirectionType direction ) : MovementDirectionType
direction MovementDirectionType
Результат MovementDirectionType

TranslateDirectionToAsciiCharacter() публичный статический Метод

Translates hard directions to ascii characters. UP inclines are always brackets open to the left, DOWN is always bracket open to the right
public static TranslateDirectionToAsciiCharacter ( MovementDirectionType direction ) : string
direction MovementDirectionType the hard direction to turn into a character
Результат string

TranslateDirectionToDegrees() публичный статический Метод

Translates direction words into degreesFromNorth and inclineGrade for pathways, returns the absolute default value
public static TranslateDirectionToDegrees ( MovementDirectionType direction ) : int>.Tuple
direction MovementDirectionType the value to translate
Результат int>.Tuple

TranslateToDirection() публичный статический Метод

Translates degreesFromNorth into direction words for pathways
public static TranslateToDirection ( int degreesFromNorth, int inclineGrade, bool reverse = false ) : MovementDirectionType
degreesFromNorth int the value to translate
inclineGrade int the value to translate
reverse bool reverse the direction or not
Результат MovementDirectionType