protected virtual void EnablePointerBeam(object sender, ControllerClickedEventArgs e)
 {
     setPlayAreaCursorCollision(false);
     controllerIndex = e.controllerIndex;
     //TogglePointer(true);
     isActive = true;
 }
Beispiel #2
0
 private void DoReleaseObject(object sender, ControllerClickedEventArgs e)
 {
     if (IsObjectHoldOnGrab(grabbedObject) || grabEnabledState >= 2)
     {
         ReleaseObject(e.controllerIndex, true);
     }
 }
 void DoTouchpadClicked(object sender, ControllerClickedEventArgs e)
 {
     for (int i = 0; i < 20; i++)
     {
         Instantiate(spawnMe, position, Quaternion.identity);
     }
 }
Beispiel #4
0
 protected override void DisablePointerBeam(object sender, ControllerClickedEventArgs e)
 {
     base.PointerSet();
     base.DisablePointerBeam(sender, e);
     TogglePointerCursor(false);
     curvedBeam.TogglePoints(false);
 }
Beispiel #5
0
 void DoGrabObject(object sender, ControllerClickedEventArgs e)
 {
     if (interactTouch.GetTouchedObject() != null && interactTouch.IsObjectInteractable(interactTouch.GetTouchedObject()))
     {
         GrabInteractedObject();
     }
 }
 public virtual void OnTouchpadAxisChanged(ControllerClickedEventArgs e)
 {
     if (TouchpadAxisChanged != null)
     {
         TouchpadAxisChanged(this, e);
     }
 }
 public virtual void OnGripUnclicked(ControllerClickedEventArgs e)
 {
     if (GripUnclicked != null)
     {
         GripUnclicked(this, e);
     }
 }
 public virtual void OnAliasMenuOff(ControllerClickedEventArgs e)
 {
     if (AliasMenuOff != null)
     {
         AliasMenuOff(this, e);
     }
 }
 public virtual void OnAliasUseOn(ControllerClickedEventArgs e)
 {
     if (AliasUseOn != null)
     {
         AliasUseOn(this, e);
     }
 }
 public virtual void OnTriggerAxisChanged(ControllerClickedEventArgs e)
 {
     if (TriggerAxisChanged != null)
     {
         TriggerAxisChanged(this, e);
     }
 }
Beispiel #11
0
 void DoTouchpadClicked(object sender, ControllerClickedEventArgs e)
 {
     for (int i = 0; i < 20; i++)
     {
         Instantiate(spawnMe, position, Quaternion.identity);
     }
 }
 public virtual void OnApplicationMenuClicked(ControllerClickedEventArgs e)
 {
     if (ApplicationMenuClicked != null)
     {
         ApplicationMenuClicked(this, e);
     }
 }
Beispiel #13
0
 void ev_AliasUseOff(object sender, ControllerClickedEventArgs e)
 {
     if (((SteamVR_ControllerEvents)sender).gameObject.tag == "Right")
     {
         _using = false;
     }
 }
 protected override void DisablePointerBeam(object sender, ControllerClickedEventArgs e)
 {
     base.PointerSet();
     base.DisablePointerBeam(sender, e);
     TogglePointerCursor(false);
     curvedBeam.TogglePoints(false);
 }
Beispiel #15
0
 private void DoReleaseObject(object sender, ControllerClickedEventArgs e)
 {
     if (IsObjectHoldOnGrab(grabbedObject) || grabEnabledState >= 2)
     {
         UngrabInteractedObject(e.controllerIndex);
         grabEnabledState = 0;
     }
 }
 private void DoStopUseObject(object sender, ControllerClickedEventArgs e)
 {
     if (IsObjectHoldOnUse(usingObject) || GetObjectUsingState(usingObject) >= 2)
     {
         SetObjectUsingState(usingObject, 0);
         UnuseInteractedObject();
     }
 }
 private void DoStopUseObject(object sender, ControllerClickedEventArgs e)
 {
     if (IsObjectHoldOnUse(usingObject) || GetObjectUsingState(usingObject) >= 2)
     {
         SetObjectUsingState(usingObject, 0);
         UnuseInteractedObject();
     }
 }
 void DoMenuOn(object sender, ControllerClickedEventArgs e)
 {
     if (!menuInit)
     {
         InitMenu();
     }
     clonedMenuObject.SetActive(true);
     menuActive = true;
 }
 void DoMenuOn(object sender, ControllerClickedEventArgs e)
 {
     if (!menuInit)
     {
         InitMenu();
     }
     clonedMenuObject.SetActive(true);
     menuActive = true;
 }
 protected virtual void DisablePointerBeam(object sender, ControllerClickedEventArgs e)
 {
     if (isActive && activateDelayTimer <= 0)
     {
         activateDelayTimer = activateDelay * updatesPerSecond;
         controllerIndex    = e.controllerIndex;
         TogglePointer(false);
         isActive = false;
     }
 }
Beispiel #21
0
 protected override void DisablePointerBeam(object sender, ControllerClickedEventArgs e)
 {
     controllerIndex = e.controllerIndex;
     if (pointerContactTarget != null)
     {
         base.PointerSet();
     }
     TogglePointer(false);
     TogglePointerCursor(false);
     curvedBeam.TogglePoints(false);
 }
Beispiel #22
0
 private void DoGrabObject(object sender, ControllerClickedEventArgs e)
 {
     if (interactTouch.GetTouchedObject() != null && interactTouch.IsObjectInteractable(interactTouch.GetTouchedObject()))
     {
         GrabInteractedObject();
         if (!IsObjectHoldOnGrab(interactTouch.GetTouchedObject()))
         {
             grabEnabledState++;
         }
     }
 }
Beispiel #23
0
 void ev_AliasGrabOff(object sender, ControllerClickedEventArgs e)
 {
     if (((SteamVR_ControllerEvents)sender).gameObject.tag == "Right")
     {
         _grabbing = false;
     }
     else
     {
         _flying = false;
     }
 }
Beispiel #24
0
 void ev_AliasUseOn(object sender, ControllerClickedEventArgs e)
 {
     if (((SteamVR_ControllerEvents)sender).gameObject.tag == "Right")
     {
         _using = true;
         if (_grabbing)
         {
             DoReset();
         }
     }
 }
 protected virtual void EnablePointerBeam(object sender, ControllerClickedEventArgs e)
 {
     if (!isActive && activateDelayTimer <= 0)
     {
         setPlayAreaCursorCollision(false);
         //controllerIndex = e.controllerIndex;
         controllerIndex = (uint)GameObject.FindObjectOfType <GUILayer>().GetComponent <SteamVR_TrackedObject>().index;
         TogglePointer(true);
         isActive = true;
     }
 }
 private void DoStartUseObject(object sender, ControllerClickedEventArgs e)
 {
     GameObject touchedObject = interactTouch.GetTouchedObject();
     if (touchedObject != null && interactTouch.IsObjectInteractable(touchedObject))
     {
         UseInteractedObject(touchedObject);
         if (!IsObjectHoldOnUse(usingObject))
         {
             SetObjectUsingState(usingObject, GetObjectUsingState(usingObject) + 1);
         }
     }
 }
 protected virtual void DisablePointerBeam(object sender, ControllerClickedEventArgs e)
 {
     if (isActive && activateDelayTimer <= 0)
     {
         activateDelayTimer = activateDelay * updatesPerSecond;
         //controllerIndex = e.controllerIndex;
         Debug.Log(GameObject.FindObjectOfType <GUILayer>().GetComponent <SteamVR_TrackedObject>().index);
         controllerIndex = (uint)GameObject.FindObjectOfType <GUILayer>().GetComponent <SteamVR_TrackedObject>().index;
         TogglePointer(false);
         isActive = false;
     }
 }
    private void DoStartUseObject(object sender, ControllerClickedEventArgs e)
    {
        GameObject touchedObject = interactTouch.GetTouchedObject();

        if (touchedObject != null && interactTouch.IsObjectInteractable(touchedObject))
        {
            UseInteractedObject(touchedObject);
            if (!IsObjectHoldOnUse(usingObject))
            {
                SetObjectUsingState(usingObject, GetObjectUsingState(usingObject) + 1);
            }
        }
    }
Beispiel #29
0
 private void DoReleaseObject(object sender, ControllerClickedEventArgs e)
 {
     if (IsObjectHoldOnGrab(grabbedObject) || grabEnabledState >= 2)
     {
         if (grabbedObject.GetComponent <SteamVR_InteractableObject>().AttatchIsTrackObject())
         {
             UngrabTrackedObject();
         }
         else
         {
             ReleaseObject(e.controllerIndex, true);
         }
     }
 }
 void DisablePointerBeam(object sender, ControllerClickedEventArgs e)
 {
     controllerIndex = e.controllerIndex;
     if (pointerContactTarget != null)
     {
         Vector3 teleportLocation = new Vector3(projectedBeamDown.transform.position.x,
                                                pointerContactTarget.transform.position.y + (pointerContactTarget.transform.localScale.y / 2) + 0.05f,
                                                projectedBeamDown.transform.position.z);
         OnWorldPointerDestinationSet(SetPointerEvent(controllerIndex, pointerContactDistance, pointerContactTarget, teleportLocation));
     }
     TogglePointer(false);
     curvedBeam.TogglePoints(false);
     pointerCursor.gameObject.SetActive(false);
 }
    void DoTriggerClicked(object sender, ControllerClickedEventArgs e)
    {
        if (!pointerContactTarget)
        {
            return;
        }

        if (pointerContactTarget.GetComponent <SteamVR_InteractableObject>())
        {
            ReceivedMessageEventArg msg;
            msg.message = "User Clicked Trigger button On the HelpTile";
            pointerContactTarget.GetComponent <SteamVR_InteractableObject>().DoShowSubPanel(this, msg);
        }
    }
    void DoTouchpadClicked(object sender, ControllerClickedEventArgs e)
    {
        if (!pointerContactTarget || !pointerContactTarget.GetComponent <TilePane> ())
        {
            return;
        }

        if (m_TileInfo && m_TileInfo.activeSelf)
        {
            if (e.touchpadAxis.y > 0.4f)
            {
                m_TxtInfo.Down();
            }
            else if (e.touchpadAxis.y < -0.4f)
            {
                m_TxtInfo.Up();
            }
        }
    }
Beispiel #33
0
    private void DoGrabObject(object sender, ControllerClickedEventArgs e)
    {
        if (IsValidGrab())
        {
            if (interactTouch.GetTouchedObject().GetComponent <SteamVR_InteractableObject>().AttatchIsTrackObject())
            {
                GrabTrackedObject();
            }
            else
            {
                GrabInteractedObject();
            }

            if (!IsObjectHoldOnGrab(interactTouch.GetTouchedObject()))
            {
                grabEnabledState++;
            }
        }
    }
Beispiel #34
0
 void ev_TouchpadAxisChanged(object sender, ControllerClickedEventArgs e)
 {
     if (((SteamVR_ControllerEvents)sender).gameObject.tag == "Left")
     {
         if (e.touchpadAxis[0] <= -0.6f && _resetrotate)
         {
             _rotateleft  = true;
             _rotateright = false;
         }
         else if (e.touchpadAxis[0] >= 0.6f && _resetrotate)
         {
             _rotateleft  = false;
             _rotateright = true;
         }
         else
         {
             _rotateleft  = false;
             _rotateright = false;
             _resetrotate = true;
         }
     }
 }
 public virtual void OnTouchpadUntouched(ControllerClickedEventArgs e)
 {
     if (TouchpadUntouched != null)
         TouchpadUntouched(this, e);
 }
 private void DoReleaseObject(object sender, ControllerClickedEventArgs e)
 {
     AttemptReleaseObject(e.controllerIndex);
 }
 private void DoGrabObject(object sender, ControllerClickedEventArgs e)
 {
     AttemptGrabObject();
 }
 void DoApplicationMenuClicked(object sender, ControllerClickedEventArgs e)
 {
     rcCarScript.Reset();
 }
 private void DoTouchpadUntouched(object sender, ControllerClickedEventArgs e)
 {
     touchAxis = Vector2.zero;
 }
 void DoTouchpadUntouched(object sender, ControllerClickedEventArgs e)
 {
     DebugLogger(e.controllerIndex, "TOUCHPAD", "untouched", e.buttonPressure, e.touchpadAxis);
 }
 public virtual void OnAliasUseOn(ControllerClickedEventArgs e)
 {
     if (AliasUseOn != null)
         AliasUseOn(this, e);
 }
 void DoTriggerUnclicked(object sender, ControllerClickedEventArgs e)
 {
     DebugLogger(e.controllerIndex, "TRIGGER", "released", e.buttonPressure, e.touchpadAxis);
 }
 void DoTriggerUnclicked(object sender, ControllerClickedEventArgs e)
 {
     rcCarScript.SetTriggerAxis(0f);
 }
 void DoTriggerAxisChanged(object sender, ControllerClickedEventArgs e)
 {
     rcCarScript.SetTriggerAxis(e.buttonPressure);
 }
 void DoTouchpadUntouched(object sender, ControllerClickedEventArgs e)
 {
     rcCarScript.SetTouchAxis(Vector2.zero);
 }
 void DoTouchpadAxisChanged(object sender, ControllerClickedEventArgs e)
 {
     rcCarScript.SetTouchAxis(e.touchpadAxis);
 }
 public virtual void OnGripUnclicked(ControllerClickedEventArgs e)
 {
     if (GripUnclicked != null)
         GripUnclicked(this, e);
 }
 public virtual void OnApplicationMenuUnclicked(ControllerClickedEventArgs e)
 {
     if (ApplicationMenuUnclicked != null)
         ApplicationMenuUnclicked(this, e);
 }
 void DoMenuOff(object sender, ControllerClickedEventArgs e)
 {
     clonedMenuObject.SetActive(false);
     menuActive = false;
 }
 public virtual void OnAliasPointerOff(ControllerClickedEventArgs e)
 {
     if (AliasPointerOff != null)
         AliasPointerOff(this, e);
 }
 protected virtual void DisablePointerBeam(object sender, ControllerClickedEventArgs e)
 {
     if (isActive && activateDelayTimer <= 0)
     {
         activateDelayTimer = activateDelay * updatesPerSecond;
         controllerIndex = e.controllerIndex;
         TogglePointer(false);
         isActive = false;
     }
 }
 protected override void DisablePointerBeam(object sender, ControllerClickedEventArgs e)
 {
     base.PointerSet();
     base.DisablePointerBeam(sender, e);
 }
 public virtual void OnTriggerUnclicked(ControllerClickedEventArgs e)
 {
     if (TriggerUnclicked != null)
         TriggerUnclicked(this, e);
 }
 private void DoTouchpadAxisChanged(object sender, ControllerClickedEventArgs e)
 {
     touchAxis = e.touchpadAxis;
 }
 void DoTriggerClicked(object sender, ControllerClickedEventArgs e)
 {
     Instantiate(spawnMe, position, Quaternion.identity);
 }
 void DoApplicationMenuUnclicked(object sender, ControllerClickedEventArgs e)
 {
     DebugLogger(e.controllerIndex, "APPLICATION MENU", "released", e.buttonPressure, e.touchpadAxis);
 }
 protected virtual void EnablePointerBeam(object sender, ControllerClickedEventArgs e)
 {
     if (!isActive && activateDelayTimer <= 0)
     {
         setPlayAreaCursorCollision(false);
         controllerIndex = e.controllerIndex;
         TogglePointer(true);
         isActive = true;
     }
 }
Beispiel #58
0
 protected override void DisablePointerBeam(object sender, ControllerClickedEventArgs e)
 {
     base.PointerSet();
     base.DisablePointerBeam(sender, e);
 }
 void DoGripClicked(object sender, ControllerClickedEventArgs e)
 {
     DebugLogger(e.controllerIndex, "GRIP", "pressed down", e.buttonPressure, e.touchpadAxis);
 }