public override void Dispose() { if (_tweening) { GTween.Kill(this); } base.Dispose(); }
/// <summary> /// 动态改变进度值。 /// </summary> /// <param name="value"></param> /// <param name="duration"></param> public GTweener TweenValue(double value, float duration) { double oldValule = _value; _value = value; if (_tweening) { GTween.Kill(this, TweenPropType.Progress, false); } _tweening = true; return(GTween.ToDouble(oldValule, _value, duration) .SetEase(EaseType.Linear) .SetTarget(this, TweenPropType.Progress) .OnComplete(() => { _tweening = false; })); }