Show / Hide Table of Contents

Class InputManager

InputManager singleton class for Daggerfall-specific game actions.

Inheritance
Object
Object
Component
Behaviour
MonoBehaviour
InputManager
Namespace: DaggerfallWorkshop.Game
Assembly: Assembly-CSharp.dll
Syntax
public class InputManager : MonoBehaviour

Fields

| Improve this Doc View Source

controllerCursorImage

Declaration
public Texture2D controllerCursorImage
Field Value
Type Description
Texture2D
| Improve this Doc View Source

startingAxisKeyCode

Declaration
public const int startingAxisKeyCode = 5000
Field Value
Type Description
Int32
| Improve this Doc View Source

startingComboKeyCode

Declaration
public const int startingComboKeyCode = 65537
Field Value
Type Description
Int32

Properties

| Improve this Doc View Source

AnyKeyDown

Declaration
public bool AnyKeyDown { get; }
Property Value
Type Description
Boolean
| Improve this Doc View Source

AnyKeyDownIgnoreAxisBinds

Declaration
public bool AnyKeyDownIgnoreAxisBinds { get; }
Property Value
Type Description
Boolean
| Improve this Doc View Source

AnyKeyUp

Declaration
public bool AnyKeyUp { get; }
Property Value
Type Description
Boolean
| Improve this Doc View Source

AnyKeyUpIgnoreAxisBinds

Declaration
public bool AnyKeyUpIgnoreAxisBinds { get; }
Property Value
Type Description
Boolean
| Improve this Doc View Source

CurrentActions

Declaration
public InputManager.Actions[] CurrentActions { get; }
Property Value
Type Description
InputManager.Actions[]
| Improve this Doc View Source

CursorVisible

Declaration
public bool CursorVisible { get; set; }
Property Value
Type Description
Boolean
| Improve this Doc View Source

EnableController

Declaration
public bool EnableController { get; set; }
Property Value
Type Description
Boolean
| Improve this Doc View Source

HasInstance

Declaration
public static bool HasInstance { get; }
Property Value
Type Description
Boolean
| Improve this Doc View Source

Horizontal

Declaration
public float Horizontal { get; }
Property Value
Type Description
Single
| Improve this Doc View Source

Instance

Declaration
public static InputManager Instance { get; }
Property Value
Type Description
InputManager
| Improve this Doc View Source

InvertLookX

Declaration
public bool InvertLookX { get; set; }
Property Value
Type Description
Boolean
| Improve this Doc View Source

InvertLookY

Declaration
public bool InvertLookY { get; set; }
Property Value
Type Description
Boolean
| Improve this Doc View Source

IsPaused

Declaration
public bool IsPaused { get; set; }
Property Value
Type Description
Boolean
| Improve this Doc View Source

JoystickCursorSensitivity

Declaration
public float JoystickCursorSensitivity { get; set; }
Property Value
Type Description
Single
| Improve this Doc View Source

JoystickDeadzone

Declaration
public float JoystickDeadzone { get; set; }
Property Value
Type Description
Single
| Improve this Doc View Source

JoystickMovementThreshold

Declaration
public float JoystickMovementThreshold { get; set; }
Property Value
Type Description
Single
| Improve this Doc View Source

KeyCodeList

Declaration
public KeyCode[] KeyCodeList { get; }
Property Value
Type Description
KeyCode[]
| Improve this Doc View Source

LastKeyDown

Declaration
public KeyCode LastKeyDown { get; }
Property Value
Type Description
KeyCode
| Improve this Doc View Source

LastSingleKeyDown

Declaration
public KeyCode LastSingleKeyDown { get; }
Property Value
Type Description
KeyCode
| Improve this Doc View Source

LookX

Declaration
public float LookX { get; }
Property Value
Type Description
Single
| Improve this Doc View Source

LookY

Declaration
public float LookY { get; }
Property Value
Type Description
Single
| Improve this Doc View Source

MaximizeJoystickMovement

Declaration
public bool MaximizeJoystickMovement { get; set; }
Property Value
Type Description
Boolean
| Improve this Doc View Source

MousePosition

Declaration
public Vector3 MousePosition { get; }
Property Value
Type Description
Vector3
| Improve this Doc View Source

MouseX

Declaration
public float MouseX { get; }
Property Value
Type Description
Single
| Improve this Doc View Source

MouseY

Declaration
public float MouseY { get; }
Property Value
Type Description
Single
| Improve this Doc View Source

NegHorizontalLimit

Declaration
public float NegHorizontalLimit { get; set; }
Property Value
Type Description
Single
| Improve this Doc View Source

NegVerticalLimit

Declaration
public float NegVerticalLimit { get; set; }
Property Value
Type Description
Single
| Improve this Doc View Source

PosHorizontalLimit

Declaration
public float PosHorizontalLimit { get; set; }
Property Value
Type Description
Single
| Improve this Doc View Source

PosVerticalLimit

Declaration
public float PosVerticalLimit { get; set; }
Property Value
Type Description
Single
| Improve this Doc View Source

ReservedKeys

Declaration
public KeyCode[] ReservedKeys { get; }
Property Value
Type Description
KeyCode[]
| Improve this Doc View Source

ToggleAutorun

Declaration
public bool ToggleAutorun { get; set; }
Property Value
Type Description
Boolean
| Improve this Doc View Source

UsingController

Declaration
public bool UsingController { get; }
Property Value
Type Description
Boolean
| Improve this Doc View Source

Vertical

Declaration
public float Vertical { get; }
Property Value
Type Description
Single

Methods

| Improve this Doc View Source

ActionComplete(InputManager.Actions)

Returns true when specified action was in progress previous frame but not for current frame.

Declaration
public bool ActionComplete(InputManager.Actions action)
Parameters
Type Name Description
InputManager.Actions action
Returns
Type Description
Boolean
| Improve this Doc View Source

ActionStarted(InputManager.Actions)

Returns true when specified action is in progress for current frame but not for previous frame.

Declaration
public bool ActionStarted(InputManager.Actions action)
Parameters
Type Name Description
InputManager.Actions action
Returns
Type Description
Boolean
| Improve this Doc View Source

AddAction(InputManager.Actions)

Adds an action

Declaration
public void AddAction(InputManager.Actions action)
Parameters
Type Name Description
InputManager.Actions action
| Improve this Doc View Source

AddRemovedPrimaryAction(InputManager.Actions)

Declaration
public void AddRemovedPrimaryAction(InputManager.Actions action)
Parameters
Type Name Description
InputManager.Actions action
| Improve this Doc View Source

ApplyHorizontalForce(Single)

Declaration
public void ApplyHorizontalForce(float scale)
Parameters
Type Name Description
Single scale
| Improve this Doc View Source

ApplyVerticalForce(Single)

Declaration
public void ApplyVerticalForce(float scale)
Parameters
Type Name Description
Single scale
| Improve this Doc View Source

AxisKeyCodeToInputAxis(Int32)

Declaration
public string AxisKeyCodeToInputAxis(int key)
Parameters
Type Name Description
Int32 key
Returns
Type Description
String
| Improve this Doc View Source

ClearAllActions()

Clears all queued actions and action state.

Declaration
public void ClearAllActions()
| Improve this Doc View Source

ClearAxisBinding(InputManager.AxisActions)

Unbinds an Input Axis to an AxisAction via the AxisAction

Declaration
public void ClearAxisBinding(InputManager.AxisActions action)
Parameters
Type Name Description
InputManager.AxisActions action
| Improve this Doc View Source

ClearAxisBinding(String)

Unbinds an Input Axis to an AxisAction via Axis string name

Declaration
public void ClearAxisBinding(string code)
Parameters
Type Name Description
String code
| Improve this Doc View Source

ClearBinding(InputManager.Actions, Boolean)

Unbinds a KeyCode to an action via Action

Declaration
public void ClearBinding(InputManager.Actions action, bool removePrimary = true)
Parameters
Type Name Description
InputManager.Actions action
Boolean removePrimary
| Improve this Doc View Source

ClearBinding(KeyCode, Boolean)

Unbinds a KeyCode to an action via KeyCode

Declaration
public void ClearBinding(KeyCode code, bool primary = true)
Parameters
Type Name Description
KeyCode code
Boolean primary
| Improve this Doc View Source

ClearJoystickUIBinding(InputManager.JoystickUIActions)

Unbinds a KeyCode to a JoystickUIAction via the JoystickUIAction

Declaration
public void ClearJoystickUIBinding(InputManager.JoystickUIActions action)
Parameters
Type Name Description
InputManager.JoystickUIActions action
| Improve this Doc View Source

ClearJoystickUIBinding(KeyCode)

Unbinds a KeyCode to a JoystickUIAction via string name

Declaration
public void ClearJoystickUIBinding(KeyCode code)
Parameters
Type Name Description
KeyCode code
| Improve this Doc View Source

FindSingleton(out InputManager)

Declaration
public static bool FindSingleton(out InputManager singletonOut)
Parameters
Type Name Description
InputManager singletonOut
Returns
Type Description
Boolean
| Improve this Doc View Source

GetAnyKeyDown()

Declaration
public KeyCode GetAnyKeyDown()
Returns
Type Description
KeyCode
| Improve this Doc View Source

GetAnyKeyDownIgnoreAxisBinds()

Declaration
public KeyCode GetAnyKeyDownIgnoreAxisBinds()
Returns
Type Description
KeyCode
| Improve this Doc View Source

GetAnyKeyUp()

Declaration
public KeyCode GetAnyKeyUp()
Returns
Type Description
KeyCode
| Improve this Doc View Source

GetAnyKeyUpIgnoreAxisBinds()

Declaration
public KeyCode GetAnyKeyUpIgnoreAxisBinds()
Returns
Type Description
KeyCode
| Improve this Doc View Source

GetAxisActionInversion(InputManager.AxisActions)

Declaration
public bool GetAxisActionInversion(InputManager.AxisActions axis)
Parameters
Type Name Description
InputManager.AxisActions axis
Returns
Type Description
Boolean
| Improve this Doc View Source

GetAxisBinding(InputManager.AxisActions)

Finds first unity axis input string bound to a specific action.

Declaration
public string GetAxisBinding(InputManager.AxisActions action)
Parameters
Type Name Description
InputManager.AxisActions action
Returns
Type Description
String
| Improve this Doc View Source

GetBinding(InputManager.Actions)

Finds first non-None KeyCode bound to a specific action

Declaration
public KeyCode GetBinding(InputManager.Actions action)
Parameters
Type Name Description
InputManager.Actions action
Returns
Type Description
KeyCode
| Improve this Doc View Source

GetBinding(InputManager.Actions, Boolean)

Finds KeyCode bound to a specific action, under either primary or secondary bindings

Declaration
public KeyCode GetBinding(InputManager.Actions action, bool primary)
Parameters
Type Name Description
InputManager.Actions action
Boolean primary
Returns
Type Description
KeyCode
| Improve this Doc View Source

GetBindings(InputManager.Actions)

Finds all keycodes made to a specific action. Will return empty array if no bindings found.

Declaration
public KeyCode[] GetBindings(InputManager.Actions action)
Parameters
Type Name Description
InputManager.Actions action
Returns
Type Description
KeyCode[]
| Improve this Doc View Source

GetCombo(KeyCode)

Declaration
public Tuple<KeyCode, KeyCode> GetCombo(KeyCode comboCode)
Parameters
Type Name Description
KeyCode comboCode
Returns
Type Description
Tuple<KeyCode, KeyCode>
| Improve this Doc View Source

GetComboCode(String)

Declaration
public KeyCode GetComboCode(string s)
Parameters
Type Name Description
String s
Returns
Type Description
KeyCode
| Improve this Doc View Source

GetComboCode(KeyCode, KeyCode)

Declaration
public KeyCode GetComboCode(KeyCode a, KeyCode b)
Parameters
Type Name Description
KeyCode a
KeyCode b
Returns
Type Description
KeyCode
| Improve this Doc View Source

GetComboString(KeyCode)

Declaration
public string GetComboString(KeyCode comboCode)
Parameters
Type Name Description
KeyCode comboCode
Returns
Type Description
String
| Improve this Doc View Source

GetComboString(KeyCode, KeyCode)

Declaration
public string GetComboString(KeyCode a, KeyCode b)
Parameters
Type Name Description
KeyCode a
KeyCode b
Returns
Type Description
String
| Improve this Doc View Source

GetJoystickUIBinding(InputManager.JoystickUIActions)

Declaration
public KeyCode GetJoystickUIBinding(InputManager.JoystickUIActions action)
Parameters
Type Name Description
InputManager.JoystickUIActions action
Returns
Type Description
KeyCode
| Improve this Doc View Source

GetKey(KeyCode, Boolean)

Declaration
public bool GetKey(KeyCode k, bool useSecondary = true)
Parameters
Type Name Description
KeyCode k
Boolean useSecondary
Returns
Type Description
Boolean
| Improve this Doc View Source

GetKeyDown(KeyCode, Boolean)

Declaration
public bool GetKeyDown(KeyCode k, bool useSecondary = true)
Parameters
Type Name Description
KeyCode k
Boolean useSecondary
Returns
Type Description
Boolean
| Improve this Doc View Source

GetKeyString(KeyCode)

Declaration
public string GetKeyString(KeyCode key)
Parameters
Type Name Description
KeyCode key
Returns
Type Description
String
| Improve this Doc View Source

GetKeyUp(KeyCode, Boolean)

Declaration
public bool GetKeyUp(KeyCode k, bool useSecondary = true)
Parameters
Type Name Description
KeyCode k
Boolean useSecondary
Returns
Type Description
Boolean
| Improve this Doc View Source

GetMouseButton(Int32)

Declaration
public bool GetMouseButton(int button)
Parameters
Type Name Description
Int32 button
Returns
Type Description
Boolean
| Improve this Doc View Source

GetMouseButtonDown(Int32)

Declaration
public bool GetMouseButtonDown(int button)
Parameters
Type Name Description
Int32 button
Returns
Type Description
Boolean
| Improve this Doc View Source

GetMouseButtonUp(Int32)

Declaration
public bool GetMouseButtonUp(int button)
Parameters
Type Name Description
Int32 button
Returns
Type Description
Boolean
| Improve this Doc View Source

GetUIScrollMovement()

Declaration
public float GetUIScrollMovement()
Returns
Type Description
Single
| Improve this Doc View Source

HasAction(InputManager.Actions)

Returns true when specified action is in progress for current frame.

Declaration
public bool HasAction(InputManager.Actions action)
Parameters
Type Name Description
InputManager.Actions action
Returns
Type Description
Boolean
| Improve this Doc View Source

IsUsedInAxisBinding(KeyCode)

Declaration
public bool IsUsedInAxisBinding(KeyCode code)
Parameters
Type Name Description
KeyCode code
Returns
Type Description
Boolean
| Improve this Doc View Source

ParseKeyCodeString(String)

Declaration
public KeyCode ParseKeyCodeString(string s)
Parameters
Type Name Description
String s
Returns
Type Description
KeyCode
| Improve this Doc View Source

RaiseLoadedKeyBindsEvent()

Declaration
protected virtual void RaiseLoadedKeyBindsEvent()
| Improve this Doc View Source

RaiseSavedKeyBindsEvent()

Declaration
protected virtual void RaiseSavedKeyBindsEvent()
| Improve this Doc View Source

RaiseUpdatedKeyBindsEvent(KeyCode)

Declaration
protected virtual void RaiseUpdatedKeyBindsEvent(KeyCode code)
Parameters
Type Name Description
KeyCode code
| Improve this Doc View Source

ResetDefaults(Boolean)

Declaration
public void ResetDefaults(bool autofill = false)
Parameters
Type Name Description
Boolean autofill
| Improve this Doc View Source

SaveKeyBinds()

Declaration
public void SaveKeyBinds()
| Improve this Doc View Source

SetAxisActionInversion(InputManager.AxisActions, Boolean)

Declaration
public void SetAxisActionInversion(InputManager.AxisActions axis, bool invert)
Parameters
Type Name Description
InputManager.AxisActions axis
Boolean invert
| Improve this Doc View Source

SetAxisBinding(String, InputManager.AxisActions)

Binds an Input Axis to an AxisAction

Declaration
public void SetAxisBinding(string code, InputManager.AxisActions action)
Parameters
Type Name Description
String code
InputManager.AxisActions action
| Improve this Doc View Source

SetBinding(KeyCode, InputManager.Actions, Boolean)

Binds a KeyCode to an action

Declaration
public void SetBinding(KeyCode code, InputManager.Actions action, bool primary = true)
Parameters
Type Name Description
KeyCode code
InputManager.Actions action
Boolean primary
| Improve this Doc View Source

SetJoystickUIBinding(KeyCode, InputManager.JoystickUIActions)

Declaration
public void SetJoystickUIBinding(KeyCode code, InputManager.JoystickUIActions action)
Parameters
Type Name Description
KeyCode code
InputManager.JoystickUIActions action

Events

| Improve this Doc View Source

OnLoadedKeyBinds

Declaration
public static event InputManager.OnLoadSaveKeyBinds OnLoadedKeyBinds
Event Type
Type Description
InputManager.OnLoadSaveKeyBinds
| Improve this Doc View Source

OnSavedKeyBinds

Declaration
public static event InputManager.OnLoadSaveKeyBinds OnSavedKeyBinds
Event Type
Type Description
InputManager.OnLoadSaveKeyBinds
| Improve this Doc View Source

OnUpdatedKeyBind

Declaration
public static event InputManager.OnUpdateKeyBind OnUpdatedKeyBind
Event Type
Type Description
InputManager.OnUpdateKeyBind

Extension Methods

MBExtensions.Invoke(MonoBehaviour, Action, Single)
MBExtensions.Invoke<T>(MonoBehaviour, Action<T>, T, Single)
MBExtensions.Invoke<T1, T2>(MonoBehaviour, Action<T1, T2>, T1, T2, Single)
MBExtensions.Invoke<T1, T2, T3>(MonoBehaviour, Action<T1, T2, T3>, T1, T2, T3, Single)
MBExtensions.Invoke<T1, T2, T3, T4>(MonoBehaviour, Action<T1, T2, T3, T4>, T1, T2, T3, T4, Single)
  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX