/// <summary>Tweens a TextMeshPro faceColor's alpha to the given value. /// Also stores the TextMeshPro as the tween's target so it can be used for filtered operations</summary> /// <param name="endValue">The end value to reach</param><param name="duration">The duration of the tween</param> public static Tweener DOFaceFade(this TMP_Text target, float endValue, float duration) { return(DOTween.ToAlpha(() => target.faceColor, x => target.faceColor = x, endValue, duration) .SetTarget(target)); }
/// <summary>Tweens an Image's alpha color to the given value. /// Also stores the image as the tween's target so it can be used for filtered operations</summary> /// <param name="endValue">The end value to reach</param><param name="duration">The duration of the tween</param> public static Tweener DOFade(this Image target, float endValue, float duration) { return(DOTween.ToAlpha(() => target.color, x => target.color = x, endValue, duration) .SetTarget(target)); }
/// <summary>Tweens an Graphic's alpha color to the given value. /// Also stores the image as the tween's target so it can be used for filtered operations</summary> /// <param name="endValue">The end value to reach</param><param name="duration">The duration of the tween</param> public static Tweener DOFade(this UnityEngine.UI.Graphic target, float endValue, float duration) { return(DOTween.ToAlpha(() => target.color, x => target.color = x, endValue, duration) .SetTarget(target)); }