VR Development Framework
v 1.0.0
 All Classes Namespaces Functions Variables Enumerations Enumerator Properties Events Pages
bool AVR.Core.AVR_ControllerInputManager.getEventStatus ( BoolEvent  type)
inline

Returns the status of a given BoolEvent

Definition at line 234 of file AVR_ControllerInputManager.cs.

235  {
236 #if AVR_NET
237  if(!IsOwner) return false;
238 #endif
239  switch (type)
240  {
241  case BoolEvent.PRIMARY2DAXIS_CLICK : { return primary2DAxisClick; }
242  case BoolEvent.PRIMARY2DAXIS_CLICK_LEFT: { return primary2DAxisClick && primary2DAxis.x < -0.5; }
243  case BoolEvent.PRIMARY2DAXIS_CLICK_RIGHT: { return primary2DAxisClick && primary2DAxis.x > 0.5; }
244  case BoolEvent.PRIMARY2DAXIS_CLICK_LEFTORRIGHT: { return primary2DAxisClick && Mathf.Abs(primary2DAxis.x) > 0.5; }
245  case BoolEvent.PRIMARY2DAXIS_CLICK_MIDDLE: { return primary2DAxisClick && Mathf.Abs(primary2DAxis.x) < 0.5; }
246  case BoolEvent.PRIMARY2DAXIS_CLICKDOWN: { return primary2DAxisClickDown; }
247  case BoolEvent.PRIMARY2DAXIS_CLICKDOWN_LEFT: { return primary2DAxisClickDown && primary2DAxis.x < -0.5; }
248  case BoolEvent.PRIMARY2DAXIS_CLICKDOWN_RIGHT: { return primary2DAxisClickDown && primary2DAxis.x > 0.5; }
249  case BoolEvent.PRIMARY2DAXIS_CLICKDOWN_LEFTORRIGHT: { return primary2DAxisClickDown && Mathf.Abs(primary2DAxis.x) > 0.5; }
250  case BoolEvent.PRIMARY2DAXIS_CLICKDOWN_MIDDLE: { return primary2DAxisClickDown && Mathf.Abs(primary2DAxis.x) < 0.5; }
251  case BoolEvent.PRIMARY2DAXIS_TOUCH: { return primary2DAxisTouch; }
252  case BoolEvent.PRIMARY2DAXIS_TOUCH_LEFT: { return primary2DAxisTouch && primary2DAxis.x < -0.5; }
253  case BoolEvent.PRIMARY2DAXIS_TOUCH_RIGHT: { return primary2DAxisTouch && primary2DAxis.x > 0.5; }
254  case BoolEvent.PRIMARY2DAXIS_TOUCH_LEFTORRIGHT: { return primary2DAxisTouch && Mathf.Abs(primary2DAxis.x) > 0.5; }
255  case BoolEvent.PRIMARY2DAXIS_TOUCH_MIDDLE: { return primary2DAxisTouch && Mathf.Abs(primary2DAxis.x) < 0.5; }
256  case BoolEvent.TRIGGER_TRIGGER: { return triggerButton; }
257  case BoolEvent.TRIGGER_ONTRIGGERDOWN: { return triggerDown; }
258  case BoolEvent.TRIGGER_ONTRIGGERUP: { return triggerUp; }
259  case BoolEvent.MENUBUTTON: { return menuButton; }
260  case BoolEvent.MENUBUTTON_DOWN: { return menuButtonDown; }
261  case BoolEvent.MENUBUTTON_UP: { return menuButtonUp; }
262  case BoolEvent.GRIP_GRIP: { return grip; }
263  case BoolEvent.GRIP_ONGRIPDOWN: { return gripDown; }
264  case BoolEvent.GRIP_ONGRIPUP: { return gripUp; }
265  case BoolEvent.ANY_CANCEL: { return menuButtonDown || triggerDown || primary2DAxisClick; }
266  case BoolEvent.ALWAYS_TRUE: { return true; }
267  case BoolEvent.ALWAYS_FALSE: { return false; }
268  default : { AVR_DevConsole.cwarn("getEventStatus does not recoginze value "+type, this); break; }
269  }
270  return false;
271  }
bool gripUp
True on the frame the grip is released
bool triggerDown
True on the frame the trigger-button is pressed down
bool primary2DAxisTouch
True if the primary2D axis is being touched by the user
bool menuButtonUp
True on the frame the menubutton is released
bool menuButton
True if the menu-button is pressed
bool grip
True if the grip is pressed
bool triggerUp
True on the frame the trigger-button is released
bool primary2DAxisClick
True if the primary2D axis is being clicked
bool menuButtonDown
True on the frame the menubutton is pressed down
bool gripDown
True on the frame the grip is pressed down
bool primary2DAxisClickDown
True on the frame that the primary 2D axis is pressed down
bool triggerButton
True if the trigger button is being pressed