C# Класс Bricklayer.Client.InputHandler

Gets current mouse and keyboard states and provides easy access to them
Показать файл Открыть проект Примеры использования класса

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

Метод Описание
AllKeysDown ( ) : bool

Checks if all of the keys specified are down

AnyKeysDown ( ) : bool

Checks if any of the keys specified are down

AnyKeysPressed ( ) : bool

Checks if any of the keys specified are pressed/toggled

GetDigitPressed ( ) : int

Gets the current number key pressed, returns -1 if none

InputHandler ( ) : System

Creats a new InputHandler

IsKeyDown ( Keys key ) : bool

Checks if a given key is currently down

IsKeyPressed ( Keys key ) : bool

Checks if a given key is currently being pressed (Was not pressed last state, but now is)

IsKeyUp ( Keys key ) : bool

Checks if a given key is currently up

IsLeftClicked ( ) : bool

Checks if the left button is being clicked (Currently is down, wasn't last frame)

IsLeftDown ( ) : bool

Checks if the left button is being held down

IsLeftUp ( ) : bool

Checks if the left button is currently up

IsRightClicked ( ) : bool

Checks if the right button is being clicked (Currently is down, wasn't last frame)

IsRightDown ( ) : bool

Checks if the right button is being held down

IsRightUp ( ) : bool

Checks if the right button is currently up

Update ( ) : void

Updates the input states

WasAllKeysUp ( ) : bool

Checks if all of the keys specified were up last frame

WasAnyKeysDown ( ) : bool

Checks if any of the keys specified were down last frame

WasKeyDown ( Keys key ) : bool

Checks if a given key is was down last frame

WasKeyPressed ( Keys key ) : bool

Checks if a given key has been toggled (Was pressed last state, but now isn't)

WasKeyUp ( Keys key ) : bool

Checks if a given key is was up last frame

WereAnyKeysUp ( ) : bool

Checks if any of the keys specified were up the last frame

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

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

Checks if all of the keys specified are down
public AllKeysDown ( ) : bool
Результат bool

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

Checks if any of the keys specified are down
public AnyKeysDown ( ) : bool
Результат bool

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

Checks if any of the keys specified are pressed/toggled
public AnyKeysPressed ( ) : bool
Результат bool

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

Gets the current number key pressed, returns -1 if none
public GetDigitPressed ( ) : int
Результат int

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

Creats a new InputHandler
public InputHandler ( ) : System
Результат System

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

Checks if a given key is currently down
public IsKeyDown ( Keys key ) : bool
key Keys
Результат bool

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

Checks if a given key is currently being pressed (Was not pressed last state, but now is)
public IsKeyPressed ( Keys key ) : bool
key Keys
Результат bool

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

Checks if a given key is currently up
public IsKeyUp ( Keys key ) : bool
key Keys
Результат bool

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

Checks if the left button is being clicked (Currently is down, wasn't last frame)
public IsLeftClicked ( ) : bool
Результат bool

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

Checks if the left button is being held down
public IsLeftDown ( ) : bool
Результат bool

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

Checks if the left button is currently up
public IsLeftUp ( ) : bool
Результат bool

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

Checks if the right button is being clicked (Currently is down, wasn't last frame)
public IsRightClicked ( ) : bool
Результат bool

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

Checks if the right button is being held down
public IsRightDown ( ) : bool
Результат bool

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

Checks if the right button is currently up
public IsRightUp ( ) : bool
Результат bool

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

Updates the input states
public Update ( ) : void
Результат void

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

Checks if all of the keys specified were up last frame
public WasAllKeysUp ( ) : bool
Результат bool

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

Checks if any of the keys specified were down last frame
public WasAnyKeysDown ( ) : bool
Результат bool

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

Checks if a given key is was down last frame
public WasKeyDown ( Keys key ) : bool
key Keys
Результат bool

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

Checks if a given key has been toggled (Was pressed last state, but now isn't)
public WasKeyPressed ( Keys key ) : bool
key Keys
Результат bool

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

Checks if a given key is was up last frame
public WasKeyUp ( Keys key ) : bool
key Keys
Результат bool

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

Checks if any of the keys specified were up the last frame
public WereAnyKeysUp ( ) : bool
Результат bool