Class VirtualButtonTwoWay
Describes a IVirtual
- Inheritance
-
Virtual
Button Two Way
- Implements
Remarks
This virtual button is for example useful to bind a key to a negative value (key 'left') and another key to a positive value (key 'right') thus simulating an axis button. The result of this virtual
Result = PositiveButton.GetValue - NegativeButton.GetValue;
Constructors
VirtualButtonTwoWay()
Initializes a new instance of the Virtual
VirtualButtonTwoWay(IVirtualButton, IVirtualButton)
Initializes a new instance of the Virtual
Parameters
negativeButton
IVirtualButton The negative button.
positiveButton
IVirtualButton The positive button.
Properties
NegativeButton
Gets or sets the negative button that will generate a 'negative' value if it is pressed.
Property Value
- IVirtual
Button The negative button.
PositiveButton
Gets or sets the positive button that will generate a 'positive' value if it is pressed.
Property Value
- IVirtual
Button The positive button.
Methods
GetValue(InputManager)
Gets the value associated with this virtual button from an input manager.
Parameters
manager
InputManager The manager.
Returns
- float
System.Single.
IsDown(InputManager)
Indicate if the button is currently down
Parameters
manager
InputManager The input manager
Returns
IsPressed(InputManager)
Indicate if the button has been pressed since the last frame
Parameters
manager
InputManager The input manager
Returns
IsReleased(InputManager)
Indicate if the button has been released since the last frame
Parameters
manager
InputManager The input manager
Returns
ToString()
Returns a string that represents the current object.
Returns
- string
A string that represents the current object.