C# Класс SadConsole.Input.AsciiKey

Represents the state of a single key.
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
Character char
PreviouslyPressed bool
TimeHeld float
XnaKey Keys

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

Метод Описание
Equals ( object obj ) : bool

Compares references.

Fill ( Keys key, bool shiftPressed ) : void

Fills out the fields based on the MonoGame/XNA key.

Get ( Keys key ) : AsciiKey

Shortcut to get the AsciiKey for a specific MonoGame/XNA Keys type. Shift is considered not pressed.

Get ( Keys key, bool shiftPressed ) : AsciiKey

Shortcut to get the AsciiKey for a specific MonoGame/XNA Keys type.

operator ( ) : bool

Compares if the Character field of two AsciiKey instances are the same.

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

Equals() публичный Метод

Compares references.
public Equals ( object obj ) : bool
obj object
Результат bool

Fill() публичный Метод

Fills out the fields based on the MonoGame/XNA key.
public Fill ( Keys key, bool shiftPressed ) : void
key Keys The key.
shiftPressed bool Helps identify which to use while the key is pressed. For example, if is used the field will be either 'A' if is true or 'a' if false.
Результат void

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

Shortcut to get the AsciiKey for a specific MonoGame/XNA Keys type. Shift is considered not pressed.
public static Get ( Keys key ) : AsciiKey
key Keys The key.
Результат AsciiKey

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

Shortcut to get the AsciiKey for a specific MonoGame/XNA Keys type.
public static Get ( Keys key, bool shiftPressed ) : AsciiKey
key Keys The key.
shiftPressed bool If shift should be considered pressed or not.
Результат AsciiKey

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

Compares if the Character field of two AsciiKey instances are the same.
public static operator ( ) : bool
Результат bool

Описание свойств

Character публичное свойство

The keyboard character of the key.
public char Character
Результат char

PreviouslyPressed публичное свойство

Tracks if the key was previously held when calcualting the KeyboardInfo.InitialRepeatDelay.
public bool PreviouslyPressed
Результат bool

TimeHeld публичное свойство

Total time the key has been held.
public float TimeHeld
Результат float

XnaKey публичное свойство

The key from MonoGame or XNA.
public Keys XnaKey
Результат Keys