Exemplo n.º 1
0
 protected override void Update()
 {
     base.Update();
     if (Application.isPlaying && _rayHoldingHandle != ERayOrigin.NONE)
     {
         value = _scrollableSetup.SetComponentNewValue(_minPosBar.position, _maxPosBar.position, InteractionVariableContainer.GetCurrentHitPosition(_rayHoldingHandle));
     }
 }
Exemplo n.º 2
0
        private void Update()
        {
            if (Application.isPlaying)
            {
                if (_rayHoldingHandle != ERayOrigin.NONE)
                {
                    if (vertical && verticalScrollbar)
                    {
                        verticalScrollbar.value = CheckScrollbarValue();
                    }
                    else if (horizontal && horizontalScrollbar)
                    {
                        horizontalScrollbar.value = CheckScrollbarValue();
                    }
                }
            }

            float CheckScrollbarValue()
            {
                return(_scrollableSetup.SetComponentNewValue(_minPosBar.position, _maxPosBar.position, InteractionVariableContainer.GetCurrentHitPosition(_rayHoldingHandle)));
            }
        }