private void OnClampComplete()
 {
     if (_clampedDown)
     {
         _rectTransform.anchoredPosition = new Vector2(_rectTransform.anchoredPosition.x, _spinSettings.topBoundary);
         //shift types
         for (var i = slots.Count - 1; i > 0; i--)
         {
             var res = slots[i - 1].currentResource;
             slots[i].SetType(res);
         }
     }
     OnSpinComplete?.Invoke(this._index);
 }
示例#2
0
 public void StopSpin()
 {
     if (_isComplete)
     {
         return;
     }
     StopCoroutine("WaitToEndSpin");
     this._rt.anchoredPosition = new Vector2(this._rt.anchoredPosition.x, _parent.startYPosIn);
     this._rt.DOAnchorPosY(_parent.targetYPosIn, _parent.speedIn).SetEase(_parent.easeIn).OnComplete(() =>
     {
         _isComplete = true;
         _parent.UVAnimationVisibility(this._index, false);
         OnSpinComplete?.Invoke(this._index);
     });
 }