C# 클래스 SadConsole.Input.AsciiKey

Represents the state of a single key.
파일 보기 프로젝트 열기: Thraka/SadConsole 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
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