public virtual void PointerUntriggered(LaserPointer pointer)
 {
     if (_hitByLaser)
     {
         OnClick.Invoke();
     }
 }
예제 #2
0
        public void PointerTriggered(LaserPointer pointer)
        {
            if (_state != State.Default)
            {
                Debug.LogError("Capture Pointer if not in State.Default?");
            }

            _state = State.PointerCaptured;
        }
예제 #3
0
 public void PointerEnter(LaserPointer pointer)
 {
     _originalEmissionColor = _renderer.material.GetColor("_EmissionColor");
     _renderer.material.SetColor("_EmissionColor", new Color(1, 1, 0.2f, 0.4f));
     if (_audioSource)
     {
         _audioSource.Play();
     }
 }
예제 #4
0
        public void PointerUpdate(LaserPointer pointer)
        {
            var hitPos = pointer.LastHitPoint;

            if (_state == State.PointerCaptured)
            {
                var distanceSinceLastHapticPush = Vector3.Distance(hitPos, _lastHapticPosition);
                if (distanceSinceLastHapticPush > MIN_HAPTIC_DISTANCE)
                {
                    pointer.Controller.TriggerHapticPulse(200);
                    _lastHapticPosition = hitPos;
                }
            }
        }
예제 #5
0
        public void PointerUntriggered(LaserPointer pointer)
        {
            if (_state != State.PointerCaptured)
            {
                Debug.LogError("Releasing Pointer if not in State.PointerCaptured?");
            }

            _state = State.Default;
            if (OnTriggered != null)
            {
                Debug.Log("HandlerFound");
                OnTriggered.Invoke();
            }
        }
예제 #6
0
 public void PointerExit(LaserPointer pointer)
 {
     OnLaserExit.Invoke();
 }
예제 #7
0
 // Implement interface
 public void PointerEnter(LaserPointer pointer)
 {
     OnLaserEnter.Invoke();
 }
 public virtual void PointerUpdate(LaserPointer pointer)
 {
 }
예제 #9
0
 public void PointerExit(LaserPointer pointer)
 {
 }
예제 #10
0
 public void PointerUpdate(LaserPointer pointer)
 {
     Hightlight.transform.position = pointer.LastHitPoint;
 }
 public void PointerUpdate(LaserPointer pointer)
 {
 }
 public void PointerUntriggered(LaserPointer pointer)
 {
     SelectionManager.Instance.SetSelectedItem(_annotationGizmo);
 }
 public void PointerEnter(LaserPointer pointer)
 {
     if (Vector3.Distance(transform.position, pointer.Controller.transform.position) > MIN_DISTANCE)
         SetActive(true);
 }
예제 #14
0
 public void PointerExit(LaserPointer pointer)
 {
     _renderer.material.SetColor("_EmissionColor", _originalEmissionColor);
 }
예제 #15
0
 public void PointerTriggered(LaserPointer pointer)
 {
     OnLaserClick.Invoke();
 }
 public void PointerExit(LaserPointer pointer)
 {
     SelectionManager.Instance.SetOnAnnotationGizmoUnhover(_annotationGizmo);
 }
 public void PointerExit(LaserPointer pointer)
 {
     SetActive(false);
 }
 public void PointerTriggered(LaserPointer pointer)
 {
 }
 public virtual void PointerEnter(LaserPointer pointer)
 {
     _hitByLaser = true;
     UpdateUI();
     OnHover.Invoke();
 }
예제 #20
0
 public void PointerEnter(LaserPointer pointer)
 {
     _hover = 1;
     Hightlight.SetActive(true);
 }
 public virtual void PointerExit(LaserPointer pointer)
 {
     _hitByLaser = false;
     UpdateUI();
     OnUnhover.Invoke();
 }
예제 #22
0
 public void PointerExit(LaserPointer pointer)
 {
     _hover = 0;
     Hightlight.SetActive(false);
 }
예제 #23
0
 public void PointerEnter(LaserPointer pointer)
 {
 }