Exemplo n.º 1
0
        public void ArrowUpClick()
        {
            FixUpLimit();

            if (_arrowHolded)
            {
                return;
            }

            if (Percentage > ButtonPercentagePerPage)
            {
                UpdateContentPositionAnimated(Percentage - ButtonPercentagePerPage);
            }
            else
            {
                UpdateContentPositionAnimated(0);
            }

            if (BarDrag.Percentage < 100 - ButtonPercentagePerPage)
            {
                BarDrag.UpdateBarPositionAnimated(BarDrag.Percentage + ButtonPercentagePerPage);
            }
            else
            {
                BarDrag.UpdateBarPositionAnimated(100);
            }
        }
Exemplo n.º 2
0
        protected override void DraggingAction(PointerEventData eventData)
        {
            _pointerWorldPosition     = ContentTransform.position;
            _pointerWorldPosition.y   = (ContentTransform.position.y + (eventData.pointerCurrentRaycast.worldPosition.y - _aplhaPos.y)) * Velocity;
            ContentTransform.position = _pointerWorldPosition;

            _onContentDrag.Invoke(this);
            UpdateBarPercentage();
            if (BarDrag != null)
            {
                BarDrag.UpdateBarPosition(100 - Percentage);
            }

            _aplhaPos = eventData.pointerCurrentRaycast.worldPosition;
        }
Exemplo n.º 3
0
        private IEnumerator RoutineArrowUp()
        {
            FixUpLimit();

            _arrowHolded = false;

            yield return(new WaitForSeconds(ArrowHoldTime));

            _arrowHolded = true;

            while (true)
            {
                if (Percentage > 0)
                {
                    UpdateContentPosition(Percentage - PercentagePerTime);
                }
                if (BarDrag.Percentage < 100)
                {
                    BarDrag.UpdateBarPosition(BarDrag.Percentage + PercentagePerTime);
                }

                yield return(new WaitForSeconds(IteragionPerSecond));
            }
        }
Exemplo n.º 4
0
 public void DownPosistion()
 {
     UpdateContentPositionAnimated(100);
     BarDrag.UpdateBarPositionAnimated(0);
 }
Exemplo n.º 5
0
        private void UpdateContent(BarDrag data)
        {
            FixUpLimit();

            UpdateContentPosition(100 - data.Percentage);
        }
Exemplo n.º 6
0
 private void BarDragging(BarDrag data)
 {
     Content.UpdateContentPosition(100 - data.Percentage);
 }