Пример #1
0
 private void HandleTriggerUp(byte controllerId, float triggerValue)
 {
     if (_lastButtonHit != null)
     {
         if (_lastButtonHit.OnControllerTriggerUp != null)
         {
             _lastButtonHit.OnControllerTriggerUp(triggerValue);
         }
         _pointerLight.color = _pointerLightColorHit;
         _isGrabbing         = false;
     }
     else
     {
         _pointerLight.color = _pointerLightColorNoHit;
     }
 }
        private void HandleTriggerUp(byte controllerId, float triggerValue)
        {
            if (_controllerConnectionHandler.IsControllerValid(controllerId))
            {
                if (_lastButtonHit != null)
                {
                    if (_lastButtonHit.OnControllerTriggerUp != null)
                    {
                        _lastButtonHit.OnControllerTriggerUp(triggerValue);
                    }
                    _pointerLight.color = _pointerLightColorHit;

                    if (_grabWithTrigger)
                    {
                        _isGrabbing = false;
                    }
                }
                else
                {
                    _pointerLight.color = _pointerLightColorNoHit;
                }
            }
        }