VR Development Framework
v 1.0.0
 All Classes Namespaces Functions Variables Enumerations Enumerator Properties Events Pages
Public Types | Public Member Functions | Protected Member Functions | Properties | Private Attributes | List of all members
AVR.Core.AVR_ControllerInputManager Class Reference

Manages inputs of a controller such as button presses and track-pad inputs. More...

Inheritance diagram for AVR.Core.AVR_ControllerInputManager:
AVR.Core.AVR_ControllerComponent AVR.Core.AVR_Component AVR.Core.AVR_Behaviour

Public Types

enum  BoolEvent {
  BoolEvent.PRIMARY2DAXIS_TOUCH, BoolEvent.PRIMARY2DAXIS_TOUCH_LEFT, BoolEvent.PRIMARY2DAXIS_TOUCH_RIGHT, BoolEvent.PRIMARY2DAXIS_TOUCH_LEFTORRIGHT,
  BoolEvent.PRIMARY2DAXIS_TOUCH_MIDDLE, BoolEvent.PRIMARY2DAXIS_CLICK, BoolEvent.PRIMARY2DAXIS_CLICK_LEFT, BoolEvent.PRIMARY2DAXIS_CLICK_RIGHT,
  BoolEvent.PRIMARY2DAXIS_CLICK_LEFTORRIGHT, BoolEvent.PRIMARY2DAXIS_CLICK_MIDDLE, BoolEvent.PRIMARY2DAXIS_CLICKDOWN, BoolEvent.PRIMARY2DAXIS_CLICKDOWN_LEFT,
  BoolEvent.PRIMARY2DAXIS_CLICKDOWN_RIGHT, BoolEvent.PRIMARY2DAXIS_CLICKDOWN_LEFTORRIGHT, BoolEvent.PRIMARY2DAXIS_CLICKDOWN_MIDDLE, BoolEvent.TRIGGER_ONTRIGGERDOWN,
  BoolEvent.TRIGGER_TRIGGER, BoolEvent.TRIGGER_ONTRIGGERUP, BoolEvent.MENUBUTTON, BoolEvent.MENUBUTTON_DOWN,
  BoolEvent.MENUBUTTON_UP, BoolEvent.GRIP_GRIP, BoolEvent.GRIP_ONGRIPDOWN, BoolEvent.GRIP_ONGRIPUP,
  BoolEvent.ANY_CANCEL, BoolEvent.ALWAYS_TRUE, BoolEvent.ALWAYS_FALSE
}
 Boolean-returning events of a controller. More...
 
enum  FloatEvent { FloatEvent.PRIMARY2DAXIS_X, FloatEvent.PRIMARY2DAXIS_Y }
 Floating-Point-number-returning events of a controller. More...
 
enum  Vec2Event { Vec2Event.PRIMARY2DAXIS }
 2D vector returning events of a controller. More...
 

Public Member Functions

bool getEventStatus (BoolEvent type)
 Returns the status of a given BoolEvent More...
 
float getEventStatus (FloatEvent type)
 Returns the status of a given FloatEvent More...
 
Vector2 getEventStatus (Vec2Event type)
 Returns the status of a given Vec2Event More...
 
- Public Member Functions inherited from AVR.Core.AVR_Behaviour
virtual void OnDestroy ()
 

Protected Member Functions

void LateUpdate ()
 
- Protected Member Functions inherited from AVR.Core.AVR_ControllerComponent
override void Awake ()
 
- Protected Member Functions inherited from AVR.Core.AVR_Component
virtual void Start ()
 
virtual void OnEnable ()
 
virtual void OnDisable ()
 

Properties

bool primary2DAxisTouch [get]
 True if the primary2D axis is being touched by the user More...
 
bool primary2DAxisClick [get]
 True if the primary2D axis is being clicked More...
 
bool primary2DAxisClickDown [get]
 True on the frame that the primary 2D axis is pressed down More...
 
bool primary2DAxisClickUp [get]
 True on the frame that the primary 2D axis is released More...
 
Vector2 primary2DAxis [get]
 2D value returned by the primary 2D axis. More...
 
bool triggerButton [get]
 True if the trigger button is being pressed More...
 
bool triggerDown [get]
 True on the frame the trigger-button is pressed down More...
 
bool triggerUp [get]
 True on the frame the trigger-button is released More...
 
bool menuButton [get]
 True if the menu-button is pressed More...
 
bool menuButtonDown [get]
 True on the frame the menubutton is pressed down More...
 
bool menuButtonUp [get]
 True on the frame the menubutton is released More...
 
bool grip [get]
 True if the grip is pressed More...
 
bool gripDown [get]
 True on the frame the grip is pressed down More...
 
bool gripUp [get]
 True on the frame the grip is released More...
 
- Properties inherited from AVR.Core.AVR_ControllerComponent
AVR_Controller controller [get, set]
 

Private Attributes

bool lastTrigger = false
 
bool lastMenuButton = false
 
bool lastAxisClick = false
 
bool lastGrip = false
 

Additional Inherited Members

- Public Attributes inherited from AVR.Core.AVR_Component
UnityEngine.Events.UnityEvent onAwake
 Events called when this component awakes. More...
 
UnityEngine.Events.UnityEvent onStart
 Events called when this component starts. More...
 
UnityEngine.Events.UnityEvent onEnable
 Events called when this component is enabled. More...
 
UnityEngine.Events.UnityEvent onDisable
 Events called when this component is disabled. More...
 
- Protected Attributes inherited from AVR.Core.AVR_Behaviour
AVR_PlayerRig playerRig => AVR_PlayerRig.Instance
 The current AVR_PlayerRig instance in the scene More...
 
AVR_Root root => AVR_Root.Instance
 The current AVR_Root instance in the scene More...
 
bool vrEnabled => UnityEngine.XR.XRSettings.enabled
 True if the application is running as a VR/XR application More...
 

Detailed Description

Manages inputs of a controller such as button presses and track-pad inputs.

Definition at line 11 of file AVR_ControllerInputManager.cs.