C# Class SadConsole.Input.KeyboardInfo

ファイルを表示 Open project: Thraka/SadConsole Class Usage Examples

Public Properties

Property Type Description
InitialRepeatDelay float
RepeatDelay float

Public Methods

Method Description
Clear ( ) : void

Clears the KeysPressed, KeysDown, KeysReleased collections.

IsKeyDown ( Keys key ) : bool

Returns true if the key is in the KeysDown collection.

IsKeyReleased ( Keys key ) : bool

Returns true when they is in the KeysReleased collection.

IsKeyUp ( Keys key ) : bool

Returns true if the key is not in the KeysDown collection.

KeyboardInfo ( ) : System.Collections.Generic
ProcessKeys ( GameTime gameTime ) : void

Reads the keyboard state using the GameTime from the update frame.

Method Details

Clear() public method

Clears the KeysPressed, KeysDown, KeysReleased collections.
public Clear ( ) : void
return void

IsKeyDown() public method

Returns true if the key is in the KeysDown collection.
public IsKeyDown ( Keys key ) : bool
key Keys The key to check.
return bool

IsKeyReleased() public method

Returns true when they is in the KeysReleased collection.
public IsKeyReleased ( Keys key ) : bool
key Keys The key to check.
return bool

IsKeyUp() public method

Returns true if the key is not in the KeysDown collection.
public IsKeyUp ( Keys key ) : bool
key Keys The key to check.
return bool

KeyboardInfo() public method

public KeyboardInfo ( ) : System.Collections.Generic
return System.Collections.Generic

ProcessKeys() public method

Reads the keyboard state using the GameTime from the update frame.
public ProcessKeys ( GameTime gameTime ) : void
gameTime GameTime
return void

Property Details

InitialRepeatDelay public_oe property

The initial delay after a key is first pressed before it is included a second time (while held down) in the KeysPressed collection.
public float InitialRepeatDelay
return float

RepeatDelay public_oe property

How often a key is included in the KeysPressed collection after the InitialRepeatDelay time has passed.
public float RepeatDelay
return float