C# Класс GameMath.Directions

Показать файл Открыть проект

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

Метод Описание
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