Loading...
Searching...
No Matches
PixelCrushers.Wrappers.InputDeviceManager Class Reference

This script checks for joystick and keyboard input. More...

Inheritance diagram for PixelCrushers.Wrappers.InputDeviceManager:
Collaboration diagram for PixelCrushers.Wrappers.InputDeviceManager:

Additional Inherited Members

- Public Types inherited from PixelCrushers.InputDeviceManager
enum  KeyInputSwitchesModeTo { Keyboard , Mouse }
 
- Public Member Functions inherited from PixelCrushers.InputDeviceManager
delegate bool GetButtonDownDelegate (string buttonName)
 
delegate float GetAxisDelegate (string axisName)
 
void Awake ()
 
void OnDestroy ()
 
void Start ()
 
void SetInputDevice (InputDevice newDevice)
 
void Update ()
 
bool IsUsingJoystick ()
 
bool IsUsingMouse ()
 
void BrieflyIgnoreMouseMovement ()
 
bool IsUsingKeyboard ()
 
bool IsBackButtonDown ()
 
void SetCursor (bool visible)
 
void ForceCursor (bool visible)
 
- Static Public Member Functions inherited from PixelCrushers.InputDeviceManager
static bool IsButtonDown (string buttonName)
 
static bool IsButtonUp (string buttonName)
 
static bool IsKeyDown (KeyCode keyCode)
 
static bool IsAnyKeyDown ()
 
static float GetAxis (string axisName)
 
static Vector3 GetMousePosition ()
 
static bool DefaultGetKeyDown (KeyCode keyCode)
 
static bool DefaultGetAnyKeyDown ()
 
static bool DefaultGetButtonDown (string buttonName)
 
static bool DefaultGetButtonUp (string buttonName)
 
static float DefaultGetAxis (string axisName)
 
static Vector3 DefaultGetMousePosition ()
 
static bool DefaultGetMouseButtonDown (int buttonNumber)
 
- Public Attributes inherited from PixelCrushers.InputDeviceManager
InputDevice inputDevice = InputDevice.Joystick
 
KeyCode[] joystickKeyCodesToCheck = new KeyCode[] { KeyCode.JoystickButton0, KeyCode.JoystickButton1, KeyCode.JoystickButton2, KeyCode.JoystickButton7 }
 
string[] joystickButtonsToCheck = new string[0]
 
string[] joystickAxesToCheck = new string[0]
 
float joystickAxisThreshold = 0.5f
 
string[] keyButtonsToCheck = new string[0]
 
KeyCode[] keyCodesToCheck = new KeyCode[] { KeyCode.Escape }
 
KeyInputSwitchesModeTo keyInputSwitchesModeTo = KeyInputSwitchesModeTo.Mouse
 
bool alwaysAutoFocus = false
 
bool detectMouseControl = true
 
float mouseMoveThreshold = 0.1f
 
bool controlCursorState = true
 
bool enforceCursorOnPause = false
 
bool controlGraphicRaycasters = false
 
KeyCode[] backKeyCodes = new KeyCode[] { KeyCode.JoystickButton1 }
 
string[] backButtons = new string[] { "Cancel" }
 
string submitButton = "Submit"
 
bool singleton = true
 
UnityEvent onUseKeyboard = new UnityEvent()
 
UnityEvent onUseJoystick = new UnityEvent()
 
UnityEvent onUseMouse = new UnityEvent()
 
UnityEvent onUseTouch = new UnityEvent()
 
GetButtonDownDelegate GetButtonDown = null
 
GetButtonDownDelegate GetButtonUp = null
 
GetAxisDelegate GetInputAxis = null
 
- Properties inherited from PixelCrushers.InputDeviceManager
static InputDeviceManager instance [get, set]
 
static InputDevice currentInputDevice [get]
 Current input device detected by InputDeviceManager.
 
static bool deviceUsesCursor [get]
 Returns true if current input device uses mouse cursor.
 
static CursorLockMode cursorLockMode [get, set]
 Lock mode to use when locking cursor.
 
static bool autoFocus [get]
 Automatically select (and keep selected) a selectable on the current UIPanel.
 
static bool isBackButtonDown [get]
 
static bool isInputAllowed [get, set]
 Allow user input?
 

Detailed Description

This script checks for joystick and keyboard input.

If the player uses a joystick, it enables autofocus. If the player uses the mouse or keyboard, it disables autofocus.


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