C# 클래스 NetMud.Cartography.Utilities

General utilities for map rendering and parsing
파일 보기 프로젝트 열기: SwiftAusterity/NetMud

공개 메소드들

메소드 설명
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