C# 클래스 GameMath.Directions

파일 보기 프로젝트 열기: npruehs/game-math

공개 메소드들

메소드 설명
All ( ) : IEnumerable

All eight cardinal directions, starting north, in clockwise order.

Diagonal ( ) : IEnumerable

All diagonal directions, starting north-west, in clockwise order.

HorizontalVertical ( ) : IEnumerable

Four horizonal and vertical directions, starting north, in clockwise order.

IsDiagonal ( this direction ) : bool

Checks whether the specified direction is diagonal.

IsHorizontal ( this direction ) : bool

Checks whether the specified direction is horizontal.

IsVertical ( this direction ) : bool

Checks whether the specified direction is vertical.

Opposite ( this direction ) : Direction

Returns the opposite of the passed direction.

메소드 상세

All() 공개 정적인 메소드

All eight cardinal directions, starting north, in clockwise order.
public static All ( ) : IEnumerable
리턴 IEnumerable

Diagonal() 공개 정적인 메소드

All diagonal directions, starting north-west, in clockwise order.
public static Diagonal ( ) : IEnumerable
리턴 IEnumerable

HorizontalVertical() 공개 정적인 메소드

Four horizonal and vertical directions, starting north, in clockwise order.
public static HorizontalVertical ( ) : IEnumerable
리턴 IEnumerable

IsDiagonal() 공개 정적인 메소드

Checks whether the specified direction is diagonal.
public static IsDiagonal ( this direction ) : bool
direction this Direction to check.
리턴 bool

IsHorizontal() 공개 정적인 메소드

Checks whether the specified direction is horizontal.
public static IsHorizontal ( this direction ) : bool
direction this Direction to check.
리턴 bool

IsVertical() 공개 정적인 메소드

Checks whether the specified direction is vertical.
public static IsVertical ( this direction ) : bool
direction this Direction to check.
리턴 bool

Opposite() 공개 정적인 메소드

Returns the opposite of the passed direction.
public static Opposite ( this direction ) : Direction
direction this Direction to get the opposite of.
리턴 Direction