FairyGUI.GProgressBar.TweenValue C# (CSharp) Метод

TweenValue() публичный Метод

public TweenValue ( float value, float duration ) : Tweener
value float
duration float
Результат Tweener
        public Tweener TweenValue(float value, float duration)
        {
            if (!Mathf.Approximately(_value, value))
            {
                if (_tweener != null)
                    _tweener.Kill(false);

                float oldValue = _value;
                _value = value;
                _tweener = DOTween.To(() => oldValue, v => { Update(v); }, value, duration)
                    .SetEase(Ease.Linear).OnComplete(() => { _tweener = null; });

                return _tweener;
            }
            else
                return null;
        }

Usage Example

 static public int TweenValue(IntPtr l)
 {
     try {
         FairyGUI.GProgressBar self = (FairyGUI.GProgressBar)checkSelf(l);
         System.Single         a1;
         checkType(l, 2, out a1);
         System.Single a2;
         checkType(l, 3, out a2);
         var ret = self.TweenValue(a1, a2);
         pushValue(l, true);
         pushValue(l, ret);
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
All Usage Examples Of FairyGUI.GProgressBar::TweenValue