Exemple #1
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;
        }
Exemple #2
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));
            }
        }
Exemple #3
0
 private void ContentDragging(ContentDrag data)
 {
     Bar.UpdateBarPosition(100 - data.Percentage);
 }