Binding Class |
Namespace: Codolith.InputManager
public class Binding
The Binding type exposes the following members.
Name | Description | |
---|---|---|
AddAvailableAxis |
Adds an available Axis with its RecognizionTreshold (how far the axis has to be changed so that it will be assigned to the binding)
| |
AssignToNextInput |
Causes this Binding to assign itself to the next Input that is done by the user (Be it moving an axis or pressing some buttons)
| |
AssignToNextInput(ActionBinding) |
Causes this Binding to assign itself to the next Input that is done by the user (Be it moving an axis or pressing some buttons). Also accepts a callback that will be called if the binding was assigned, or the CancelAssignmentKey was pressed
| |
AssignToNone |
Assigns this Binding to no input
| |
RaiseNewInputAssigned |
Calls the inputAssignedCallback if one was given.
| |
RaiseOnUpdate |
Raises the OnUpdate event.
| |
Update |
Updates this instance.
|
Name | Description | |
---|---|---|
AvailableAxes |
Dictionary of the Axes that can be assigned and their RecognizionTreshold
| |
AvailableKeyCodes |
Gets the available key codes, that can be assigned to a Binding. (This also includes the CancelAssignmentKey, which cant be assigned)
| |
Axis |
Gives you the Axis that is assigned to this Binding. when set, it will also set the BindingType to Axis
| |
BindingGroup |
The BindingGroup that this Binding is in, or null if this Binding was not yet added to one
| |
BindingType |
The type of the Binding
| |
CancelAssignmentKey |
Determines they Button that will be used to cancel an assignment. This Button can not be assigned to any Binding
| |
Enabled |
Returns if this Binding will be Updated. returns ThisEnabled && GroupEnabled
| |
GroupEnabled |
Tells you if the Group of this Binding is enabled. If the Group is not yet set, it returns false
| |
Keys |
Gives you the keys that are assigned to this Binding. When set, it will also set the BindingType to Keys
| |
Name |
The Name of this Binding. Avoid to use the same name twice!
| |
State |
Gives you the State of this Binding as bool. When set it checks if the State has changed and triggers the StateChanged event
| |
ThisEnabled |
Determines if this Binding is enabled
| |
Value |
Gives you the balue of this Binding as float. When set it checks if the Value has changed and triggers the ValueChanged event
|
Name | Description | |
---|---|---|
OnUpdate |
This will be triggered every time that Update() is called, even if the Binding isnt assigned to any input.
Can be used for input that directly controls something, even if it doesnt change its state or value
| |
StateChanged |
Is triggered when the State of this Binding changes
| |
ValueChanged |
Is triggered when the Value of this Binding changes
|