Class InputManager
InputManager singleton class for Daggerfall-specific game actions.
Assembly: Assembly-CSharp.dll
public class InputManager : MonoBehaviour
Fields
|
Improve this Doc
View Source
Declaration
public Texture2D controllerCursorImage
Field Value
|
Improve this Doc
View Source
Declaration
public const int startingAxisKeyCode = 5000
Field Value
|
Improve this Doc
View Source
Declaration
public const int startingComboKeyCode = 65537
Field Value
Properties
|
Improve this Doc
View Source
Declaration
public bool AnyKeyDown { get; }
Property Value
|
Improve this Doc
View Source
Declaration
public bool AnyKeyDownIgnoreAxisBinds { get; }
Property Value
|
Improve this Doc
View Source
Declaration
public bool AnyKeyUp { get; }
Property Value
|
Improve this Doc
View Source
Declaration
public bool AnyKeyUpIgnoreAxisBinds { get; }
Property Value
|
Improve this Doc
View Source
Declaration
public InputManager.Actions[] CurrentActions { get; }
Property Value
|
Improve this Doc
View Source
Declaration
public bool CursorVisible { get; set; }
Property Value
|
Improve this Doc
View Source
Declaration
public bool EnableController { get; set; }
Property Value
|
Improve this Doc
View Source
Declaration
public static bool HasInstance { get; }
Property Value
|
Improve this Doc
View Source
Declaration
public float Horizontal { get; }
Property Value
|
Improve this Doc
View Source
Declaration
public static InputManager Instance { get; }
Property Value
|
Improve this Doc
View Source
Declaration
public bool InvertLookX { get; set; }
Property Value
|
Improve this Doc
View Source
Declaration
public bool InvertLookY { get; set; }
Property Value
|
Improve this Doc
View Source
Declaration
public bool IsPaused { get; set; }
Property Value
|
Improve this Doc
View Source
Declaration
public float JoystickCursorSensitivity { get; set; }
Property Value
|
Improve this Doc
View Source
Declaration
public float JoystickDeadzone { get; set; }
Property Value
|
Improve this Doc
View Source
Declaration
public float JoystickMovementThreshold { get; set; }
Property Value
|
Improve this Doc
View Source
Declaration
public KeyCode[] KeyCodeList { get; }
Property Value
|
Improve this Doc
View Source
Declaration
public KeyCode LastKeyDown { get; }
Property Value
|
Improve this Doc
View Source
Declaration
public KeyCode LastSingleKeyDown { get; }
Property Value
|
Improve this Doc
View Source
Declaration
public float LookX { get; }
Property Value
|
Improve this Doc
View Source
Declaration
public float LookY { get; }
Property Value
|
Improve this Doc
View Source
Declaration
public bool MaximizeJoystickMovement { get; set; }
Property Value
|
Improve this Doc
View Source
Declaration
public Vector3 MousePosition { get; }
Property Value
|
Improve this Doc
View Source
Declaration
public float MouseX { get; }
Property Value
|
Improve this Doc
View Source
Declaration
public float MouseY { get; }
Property Value
|
Improve this Doc
View Source
Declaration
public float NegHorizontalLimit { get; set; }
Property Value
|
Improve this Doc
View Source
Declaration
public float NegVerticalLimit { get; set; }
Property Value
|
Improve this Doc
View Source
Declaration
public float PosHorizontalLimit { get; set; }
Property Value
|
Improve this Doc
View Source
Declaration
public float PosVerticalLimit { get; set; }
Property Value
|
Improve this Doc
View Source
Declaration
public KeyCode[] ReservedKeys { get; }
Property Value
|
Improve this Doc
View Source
Declaration
public bool ToggleAutorun { get; set; }
Property Value
|
Improve this Doc
View Source
Declaration
public bool UsingController { get; }
Property Value
|
Improve this Doc
View Source
Declaration
public float Vertical { get; }
Property Value
Methods
|
Improve this Doc
View Source
Returns true when specified action was in progress previous frame but not for current frame.
Declaration
public bool ActionComplete(InputManager.Actions action)
Parameters
Returns
|
Improve this Doc
View Source
Returns true when specified action is in progress for current frame but not for previous frame.
Declaration
public bool ActionStarted(InputManager.Actions action)
Parameters
Returns
|
Improve this Doc
View Source
Declaration
public void AddAction(InputManager.Actions action)
Parameters
|
Improve this Doc
View Source
Declaration
public void AddRemovedPrimaryAction(InputManager.Actions action)
Parameters
|
Improve this Doc
View Source
Declaration
public void ApplyHorizontalForce(float scale)
Parameters
Type |
Name |
Description |
Single |
scale |
|
|
Improve this Doc
View Source
Declaration
public void ApplyVerticalForce(float scale)
Parameters
Type |
Name |
Description |
Single |
scale |
|
|
Improve this Doc
View Source
Declaration
public string AxisKeyCodeToInputAxis(int key)
Parameters
Type |
Name |
Description |
Int32 |
key |
|
Returns
|
Improve this Doc
View Source
Clears all queued actions and action state.
Declaration
public void ClearAllActions()
|
Improve this Doc
View Source
Unbinds an Input Axis to an AxisAction via the AxisAction
Declaration
public void ClearAxisBinding(InputManager.AxisActions action)
Parameters
|
Improve this Doc
View Source
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
Unbinds a KeyCode to an action via Action
Declaration
public void ClearBinding(InputManager.Actions action, bool removePrimary = true)
Parameters
|
Improve this Doc
View Source
Unbinds a KeyCode to an action via KeyCode
Declaration
public void ClearBinding(KeyCode code, bool primary = true)
Parameters
|
Improve this Doc
View Source
Unbinds a KeyCode to a JoystickUIAction via the JoystickUIAction
Declaration
public void ClearJoystickUIBinding(InputManager.JoystickUIActions action)
Parameters
|
Improve this Doc
View Source
Unbinds a KeyCode to a JoystickUIAction via string name
Declaration
public void ClearJoystickUIBinding(KeyCode code)
Parameters
|
Improve this Doc
View Source
Declaration
public static bool FindSingleton(out InputManager singletonOut)
Parameters
Returns
|
Improve this Doc
View Source
Declaration
public KeyCode GetAnyKeyDown()
Returns
|
Improve this Doc
View Source
Declaration
public KeyCode GetAnyKeyDownIgnoreAxisBinds()
Returns
|
Improve this Doc
View Source
Declaration
public KeyCode GetAnyKeyUp()
Returns
|
Improve this Doc
View Source
Declaration
public KeyCode GetAnyKeyUpIgnoreAxisBinds()
Returns
|
Improve this Doc
View Source
Declaration
public bool GetAxisActionInversion(InputManager.AxisActions axis)
Parameters
Returns
|
Improve this Doc
View Source
Finds first unity axis input string bound to a specific action.
Declaration
public string GetAxisBinding(InputManager.AxisActions action)
Parameters
Returns
|
Improve this Doc
View Source
Finds first non-None KeyCode bound to a specific action
Declaration
public KeyCode GetBinding(InputManager.Actions action)
Parameters
Returns
|
Improve this Doc
View Source
Finds KeyCode bound to a specific action, under either primary or secondary bindings
Declaration
public KeyCode GetBinding(InputManager.Actions action, bool primary)
Parameters
Returns
|
Improve this Doc
View Source
Finds all keycodes made to a specific action.
Will return empty array if no bindings found.
Declaration
public KeyCode[] GetBindings(InputManager.Actions action)
Parameters
Returns
|
Improve this Doc
View Source
Declaration
public Tuple<KeyCode, KeyCode> GetCombo(KeyCode comboCode)
Parameters
Type |
Name |
Description |
KeyCode |
comboCode |
|
Returns
|
Improve this Doc
View Source
Declaration
public KeyCode GetComboCode(string s)
Parameters
Type |
Name |
Description |
String |
s |
|
Returns
|
Improve this Doc
View Source
Declaration
public KeyCode GetComboCode(KeyCode a, KeyCode b)
Parameters
Returns
|
Improve this Doc
View Source
Declaration
public string GetComboString(KeyCode comboCode)
Parameters
Type |
Name |
Description |
KeyCode |
comboCode |
|
Returns
|
Improve this Doc
View Source
Declaration
public string GetComboString(KeyCode a, KeyCode b)
Parameters
Returns
|
Improve this Doc
View Source
Declaration
public KeyCode GetJoystickUIBinding(InputManager.JoystickUIActions action)
Parameters
Returns
|
Improve this Doc
View Source
Declaration
public bool GetKey(KeyCode k, bool useSecondary = true)
Parameters
Returns
|
Improve this Doc
View Source
Declaration
public bool GetKeyDown(KeyCode k, bool useSecondary = true)
Parameters
Returns
|
Improve this Doc
View Source
Declaration
public string GetKeyString(KeyCode key)
Parameters
Returns
|
Improve this Doc
View Source
Declaration
public bool GetKeyUp(KeyCode k, bool useSecondary = true)
Parameters
Returns
|
Improve this Doc
View Source
Declaration
public bool GetMouseButton(int button)
Parameters
Type |
Name |
Description |
Int32 |
button |
|
Returns
|
Improve this Doc
View Source
Declaration
public bool GetMouseButtonDown(int button)
Parameters
Type |
Name |
Description |
Int32 |
button |
|
Returns
|
Improve this Doc
View Source
Declaration
public bool GetMouseButtonUp(int button)
Parameters
Type |
Name |
Description |
Int32 |
button |
|
Returns
|
Improve this Doc
View Source
Declaration
public float GetUIScrollMovement()
Returns
|
Improve this Doc
View Source
Returns true when specified action is in progress for current frame.
Declaration
public bool HasAction(InputManager.Actions action)
Parameters
Returns
|
Improve this Doc
View Source
Declaration
public bool IsUsedInAxisBinding(KeyCode code)
Parameters
Returns
|
Improve this Doc
View Source
Declaration
public KeyCode ParseKeyCodeString(string s)
Parameters
Type |
Name |
Description |
String |
s |
|
Returns
|
Improve this Doc
View Source
Declaration
protected virtual void RaiseLoadedKeyBindsEvent()
|
Improve this Doc
View Source
Declaration
protected virtual void RaiseSavedKeyBindsEvent()
|
Improve this Doc
View Source
Declaration
protected virtual void RaiseUpdatedKeyBindsEvent(KeyCode code)
Parameters
|
Improve this Doc
View Source
Declaration
public void ResetDefaults(bool autofill = false)
Parameters
Type |
Name |
Description |
Boolean |
autofill |
|
|
Improve this Doc
View Source
Declaration
public void SaveKeyBinds()
|
Improve this Doc
View Source
Declaration
public void SetAxisActionInversion(InputManager.AxisActions axis, bool invert)
Parameters
|
Improve this Doc
View Source
Binds an Input Axis to an AxisAction
Declaration
public void SetAxisBinding(string code, InputManager.AxisActions action)
Parameters
|
Improve this Doc
View Source
Binds a KeyCode to an action
Declaration
public void SetBinding(KeyCode code, InputManager.Actions action, bool primary = true)
Parameters
|
Improve this Doc
View Source
Declaration
public void SetJoystickUIBinding(KeyCode code, InputManager.JoystickUIActions action)
Parameters
Events
|
Improve this Doc
View Source
Declaration
public static event InputManager.OnLoadSaveKeyBinds OnLoadedKeyBinds
Event Type
|
Improve this Doc
View Source
Declaration
public static event InputManager.OnLoadSaveKeyBinds OnSavedKeyBinds
Event Type
|
Improve this Doc
View Source
Declaration
public static event InputManager.OnUpdateKeyBind OnUpdatedKeyBind
Event Type
Extension Methods
MBExtensions.Invoke<T1, T2, T3, T4>(MonoBehaviour, Action<T1, T2, T3, T4>, T1, T2, T3, T4, Single)