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); } }
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; }
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)); } }
public void DownPosistion() { UpdateContentPositionAnimated(100); BarDrag.UpdateBarPositionAnimated(0); }
private void UpdateContent(BarDrag data) { FixUpLimit(); UpdateContentPosition(100 - data.Percentage); }
private void BarDragging(BarDrag data) { Content.UpdateContentPosition(100 - data.Percentage); }