C# Class NetMud.Cartography.Utilities

General utilities for map rendering and parsing
Afficher le fichier Open project: SwiftAusterity/NetMud

Méthodes publiques

Méthode Description
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

Method Details

CalculateMovementDistance() public static méthode

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
Résultat int>.Tuple

GetDirectionStep() public static méthode

X, Y, Z
public static GetDirectionStep ( MovementDirectionType transversalDirection ) : Tuple
transversalDirection MovementDirectionType The direction being faced
Résultat Tuple

GetOpposingRoom() public static méthode

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)
Résultat IRoomData

IsOutOfBounds() public static méthode

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
Résultat bool

IsOutOfBounds() public static méthode

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
Résultat bool

ReverseDirection() public static méthode

public static ReverseDirection ( MovementDirectionType direction ) : MovementDirectionType
direction MovementDirectionType
Résultat MovementDirectionType

TranslateDirectionToAsciiCharacter() public static méthode

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
Résultat string

TranslateDirectionToDegrees() public static méthode

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
Résultat int>.Tuple

TranslateToDirection() public static méthode

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
Résultat MovementDirectionType