C# Класс Nez.VirtualButton

A virtual input that is represented as a boolean. As well as simply checking the current button state, you can ask whether it was just pressed or released this frame. You can also keep the button press stored in a buffer for a limited time, or until it is consumed by calling consumeBuffer()
Наследование: VirtualInput
Показать файл Открыть проект Примеры использования класса

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

Свойство Тип Описание
bufferTime float
firstRepeatTime float
multiRepeatTime float
nodes List

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

Метод Описание
VirtualButton ( ) : System.Collections.Generic
VirtualButton ( float bufferTime ) : System.Collections.Generic
addGamePadButton ( int gamepadIndex, Buttons button ) : VirtualButton

adds a GamePad buttons press to this VirtualButton

addGamePadDPad ( int gamepadIndex, Direction direction ) : VirtualButton

adds a GamePad DPad press to this VirtualButton

addGamePadLeftTrigger ( int gamepadIndex, float threshold ) : VirtualButton

adds a GamePad left trigger press to this VirtualButton

addGamePadRightTrigger ( int gamepadIndex, float threshold ) : VirtualButton

adds a GamePad right trigger press to this VirtualButton

addKeyboardKey ( Keys key ) : VirtualButton

adds a keyboard key to this VirtualButton

addKeyboardKey ( Keys key, Keys modifier ) : VirtualButton

adds a keyboard key with modifier to this VirtualButton. modifier must be in the down state for isPressed/isDown to be true.

addMouseLeftButton ( ) : VirtualButton

adds a left mouse click to this VirtualButton

addMouseRightButton ( ) : VirtualButton

adds a right mouse click to this VirtualButton

consumeBuffer ( ) : void
setRepeat ( float repeatTime ) : void
setRepeat ( float firstRepeatTime, float multiRepeatTime ) : void
update ( ) : void

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

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

public VirtualButton ( ) : System.Collections.Generic
Результат System.Collections.Generic

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

public VirtualButton ( float bufferTime ) : System.Collections.Generic
bufferTime float
Результат System.Collections.Generic

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

adds a GamePad buttons press to this VirtualButton
public addGamePadButton ( int gamepadIndex, Buttons button ) : VirtualButton
gamepadIndex int Gamepad index.
button Buttons Button.
Результат VirtualButton

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

adds a GamePad DPad press to this VirtualButton
public addGamePadDPad ( int gamepadIndex, Direction direction ) : VirtualButton
gamepadIndex int Gamepad index.
direction Direction Direction.
Результат VirtualButton

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

adds a GamePad left trigger press to this VirtualButton
public addGamePadLeftTrigger ( int gamepadIndex, float threshold ) : VirtualButton
gamepadIndex int Gamepad index.
threshold float Threshold.
Результат VirtualButton

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

adds a GamePad right trigger press to this VirtualButton
public addGamePadRightTrigger ( int gamepadIndex, float threshold ) : VirtualButton
gamepadIndex int Gamepad index.
threshold float Threshold.
Результат VirtualButton

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

adds a keyboard key to this VirtualButton
public addKeyboardKey ( Keys key ) : VirtualButton
key Keys Key.
Результат VirtualButton

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

adds a keyboard key with modifier to this VirtualButton. modifier must be in the down state for isPressed/isDown to be true.
public addKeyboardKey ( Keys key, Keys modifier ) : VirtualButton
key Keys Key.
modifier Keys Modifier.
Результат VirtualButton

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

adds a left mouse click to this VirtualButton
public addMouseLeftButton ( ) : VirtualButton
Результат VirtualButton

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

adds a right mouse click to this VirtualButton
public addMouseRightButton ( ) : VirtualButton
Результат VirtualButton

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

public consumeBuffer ( ) : void
Результат void

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

public setRepeat ( float repeatTime ) : void
repeatTime float
Результат void

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

public setRepeat ( float firstRepeatTime, float multiRepeatTime ) : void
firstRepeatTime float
multiRepeatTime float
Результат void

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

public update ( ) : void
Результат void

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

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

public float bufferTime
Результат float

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

public float firstRepeatTime
Результат float

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

public float multiRepeatTime
Результат float

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

public List nodes
Результат List