Class VirtualButtonBinding
Describes a binding between a name and a IVirtualButton.
public class VirtualButtonBinding
- Inheritance
-
VirtualButtonBinding
Constructors
VirtualButtonBinding()
Initializes a new instance of the VirtualButtonBinding class.
public VirtualButtonBinding()
VirtualButtonBinding(object, IVirtualButton)
Initializes a new instance of the VirtualButtonBinding class.
public VirtualButtonBinding(object name, IVirtualButton button = null)
Parameters
name
objectThe name.
button
IVirtualButtonThe button.
Properties
Button
Gets or sets the virtual button.
public IVirtualButton Button { get; set; }
Property Value
- IVirtualButton
The virtual button.
Name
Gets or sets the name of this virtual button.
public object Name { get; set; }
Property Value
- object
The name.
Methods
GetValue(InputManager)
Gets the value for a particular binding.
public virtual float GetValue(InputManager manager)
Parameters
manager
InputManager
Returns
- float
Value of the binding
IsDown(InputManager)
Gets the held down state for a particular binding.
public virtual bool IsDown(InputManager manager)
Parameters
manager
InputManager
Returns
- bool
true
when currently held down; otherwise,false
.
IsPressed(InputManager)
Gets the pressed state for a particular binding.
public virtual bool IsPressed(InputManager manager)
Parameters
manager
InputManager
Returns
- bool
true
when pressed since the last frame; otherwise,false
.
IsReleased(InputManager)
Gets the pressed state for a particular binding.
public virtual bool IsReleased(InputManager manager)
Parameters
manager
InputManager
Returns
- bool
true
when released since the last frame; otherwise,false
.
ToString()
Returns a string that represents the current object.
public override string ToString()
Returns
- string
A string that represents the current object.