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

                    if (_grabWithBumper && button == MLInputControllerButton.Bumper)
                    {
                        _isGrabbing = false;
                    }
                }
                else
                {
                    _pointerLight.color = _pointerLightColorNoHit;
                }
            }
        }