/* TextMeshProUGUI */ #if ENABLE_TMPRO public static Tween TwFade(this TextMeshProUGUI p, DOTweenFloat tf, Action complete = null) { p.SetAlpha(tf.start); return(p.DOFade(tf.end, tf.time).SetEase(tf.ease).OnComplete(() => { complete.Call(); })); }
/* Image */ public static Tween TwFade(this Image p, DOTweenFloat tf, System.Action complete = null) { p.SetAlpha(tf.start); return(p.DOFade(tf.end, tf.time).SetEase(tf.ease).OnComplete(() => { complete.Call(); })); }
public static Tween TwRotateZ <T>(this T p, DOTweenFloat t, RotateMode rt = RotateMode.Fast, Action complete = null) where T : Component { p.transform.localEulerAngles = v3.v(0, 0, t.start); return(p.transform.DOLocalRotate(v3.v(0, 0, t.end), t.time, rt).SetEase(t.ease).OnComplete(() => { complete.Call(); })); }
public static Tween TwScale <T>(this T p, DOTweenFloat tf, Action complete = null) where T : Component { p.transform.SetLocalScl(tf.start); return(p.transform.DOScale(tf.end, tf.time).SetEase(tf.ease).OnComplete(() => { complete.Call(); })); }
public static Tween TwLocalMoveY <T>(this T p, DOTweenFloat tw, Action complete = null) where T : Component { p.transform.SetLocalPosY(tw.start); return(p.transform.DOLocalMoveY(tw.end, tw.time).SetEase(tw.ease).OnComplete(() => { complete.Call(); })); }