PixelCrushers.DialogueSystem.InputTrigger Class Reference

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...
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ InputTrigger() [1/4]

PixelCrushers.DialogueSystem.InputTrigger.InputTrigger ( )

Initializes a new instance of the PixelCrushers.DialogueSystem.InputTrigger class with no key code or button name.

◆ InputTrigger() [2/4]

PixelCrushers.DialogueSystem.InputTrigger.InputTrigger ( KeyCode  key)

Initializes a new instance of the PixelCrushers.DialogueSystem.InputTrigger class with a key code assigned.

Parameters
keyKey that fires the trigger.

◆ InputTrigger() [3/4]

PixelCrushers.DialogueSystem.InputTrigger.InputTrigger ( string  buttonName)

Initializes a new instance of the PixelCrushers.DialogueSystem.InputTrigger class with a button name assigned.

Parameters
buttonNameName of the button defined in UnityEngine.InputManager that fires the trigger.

◆ InputTrigger() [4/4]

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.

Parameters
keyKey that fires the trigger.
buttonNameName of the button defined in UnityEngine.InputManager that fires the trigger.

Member Data Documentation

◆ buttonName

string PixelCrushers.DialogueSystem.InputTrigger.buttonName = string.Empty

The name of the button defined in UnityEngine.InputManager that fires the trigger.

◆ key

KeyCode PixelCrushers.DialogueSystem.InputTrigger.key = KeyCode.None

The key that fires the trigger.

Property Documentation

◆ IsDown

bool PixelCrushers.DialogueSystem.InputTrigger.IsDown
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.


The documentation for this class was generated from the following file: