Defines an input trigger using a key code and/or button name. More...
Public Member Functions | |
InputTrigger () | |
Initializes a new instance of the PixelCrushers.DialogueSystem.InputTrigger class with no key code or button name. More... | |
InputTrigger (KeyCode key) | |
Initializes a new instance of the PixelCrushers.DialogueSystem.InputTrigger class with a key code assigned. More... | |
InputTrigger (string buttonName) | |
Initializes a new instance of the PixelCrushers.DialogueSystem.InputTrigger class with a button name assigned. More... | |
InputTrigger (KeyCode key, string buttonName) | |
Initializes a new instance of the PixelCrushers.DialogueSystem.InputTrigger class with a key code and button name assigned. More... | |
Public Attributes | |
KeyCode | key = KeyCode.None |
The key that fires the trigger. More... | |
string | buttonName = string.Empty |
The name of the button defined in UnityEngine.InputManager that fires the trigger. More... | |
Properties | |
bool | IsDown [get] |
Gets a value indicating whether this input trigger has been triggered (i.e., the key or button is down). More... | |
Defines an input trigger using a key code and/or button name.
The easiest way to bind a key to the trigger is to assign a key code. You can also assign a button name defined in UnityEngine.InputManager such as "Fire1" or a custom-defined button.
PixelCrushers.DialogueSystem.InputTrigger.InputTrigger | ( | ) |
Initializes a new instance of the PixelCrushers.DialogueSystem.InputTrigger class with no key code or button name.
PixelCrushers.DialogueSystem.InputTrigger.InputTrigger | ( | KeyCode | key | ) |
Initializes a new instance of the PixelCrushers.DialogueSystem.InputTrigger class with a key code assigned.
key | Key that fires the trigger. |
PixelCrushers.DialogueSystem.InputTrigger.InputTrigger | ( | string | buttonName | ) |
Initializes a new instance of the PixelCrushers.DialogueSystem.InputTrigger class with a button name assigned.
buttonName | Name of the button defined in UnityEngine.InputManager that fires the trigger. |
PixelCrushers.DialogueSystem.InputTrigger.InputTrigger | ( | KeyCode | key, |
string | buttonName | ||
) |
Initializes a new instance of the PixelCrushers.DialogueSystem.InputTrigger class with a key code and button name assigned.
key | Key that fires the trigger. |
buttonName | Name of the button defined in UnityEngine.InputManager that fires the trigger. |
string PixelCrushers.DialogueSystem.InputTrigger.buttonName = string.Empty |
The name of the button defined in UnityEngine.InputManager that fires the trigger.
KeyCode PixelCrushers.DialogueSystem.InputTrigger.key = KeyCode.None |
The key that fires the trigger.
|
get |
Gets a value indicating whether this input trigger has been triggered (i.e., the key or button is down).
true
if this instance is triggered; otherwise, false
.