Ejemplo n.º 1
0
 public bool TryFindAvailableSocket(HVRGrabbable grabbable, out HVRSocket socket)
 {
     socket = Sockets.FirstOrDefault(e => !e.IsGrabbing && e.IsValid(grabbable));
     if (socket == null)
     {
         return(false);
     }
     return(true);
 }
Ejemplo n.º 2
0
 public override void OnHoverExit(HVRSocket socket, HVRGrabbable grabbable, bool isValid)
 {
     if (_hoverRoutine != null)
     {
         StopCoroutine(_hoverRoutine);
     }
     if (Target)
     {
         _hoverRoutine = StartCoroutine(ScaleHoverTarget(_originalHoverTargetScale));
     }
 }
Ejemplo n.º 3
0
 public override void OnHoverEnter(HVRSocket socket, HVRGrabbable grabbable, bool isValid)
 {
     if (!isValid && !ScaleIfInvalid)
     {
         return;
     }
     if (Target)
     {
         _hoverRoutine = StartCoroutine(ScaleHoverTarget(Scale));
     }
 }
Ejemplo n.º 4
0
        public override void OnHoverExit(HVRSocket socket, HVRGrabbable grabbable, bool isValid)
        {
            if (!InvalidMaterial && !isValid || !ValidMaterial && isValid)
            {
                return;
            }

            foreach (var kvp in _rendererMap)
            {
                kvp.Key.material = kvp.Value;
            }
        }
Ejemplo n.º 5
0
        public override void OnHoverEnter(HVRSocket socket, HVRGrabbable grabbable, bool isValid)
        {
            if (!InvalidMaterial && !isValid || !ValidMaterial && isValid)
            {
                return;
            }

            foreach (var r in _rendererMap.Keys)
            {
                r.material = isValid ? ValidMaterial : InvalidMaterial;
            }
        }
Ejemplo n.º 6
0
        public void BallSpawned(HVRSocket socket, GameObject ball)
        {
            var grabbable = ball.GetComponent <HVRGrabbable>();

            _balls.Add(grabbable);
        }
Ejemplo n.º 7
0
 protected virtual void OnBowSocketed(HVRSocket arg0, HVRGrabbable arg1)
 {
     OnArrowDropped();
 }
Ejemplo n.º 8
0
 public abstract void OnHoverExit(HVRSocket socket, HVRGrabbable grabbable, bool isValid);