static int DOColor(IntPtr L) { try { int count = LuaDLL.lua_gettop(L); if (count == 3 && TypeChecker.CheckTypes <UnityEngine.UI.Image, UnityEngine.Color, float>(L, 1)) { UnityEngine.UI.Image obj = (UnityEngine.UI.Image)ToLua.ToObject(L, 1); UnityEngine.Color arg0 = ToLua.ToColor(L, 2); float arg1 = (float)LuaDLL.lua_tonumber(L, 3); DG.Tweening.Tweener o = obj.DOColor(arg0, arg1); ToLua.PushObject(L, o); return(1); } else if (count == 3 && TypeChecker.CheckTypes <UnityEngine.UI.Graphic, UnityEngine.Color, float>(L, 1)) { UnityEngine.UI.Image obj = (UnityEngine.UI.Image)ToLua.ToObject(L, 1); UnityEngine.Color arg0 = ToLua.ToColor(L, 2); float arg1 = (float)LuaDLL.lua_tonumber(L, 3); DG.Tweening.Tweener o = obj.DOColor(arg0, arg1); ToLua.PushObject(L, o); return(1); } else { return(LuaDLL.luaL_throw(L, "invalid arguments to method: UnityEngine.UI.Image.DOColor")); } } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
static int QPYX_DOColor_YXQP(IntPtr L_YXQP) { try { int QPYX_count_YXQP = LuaDLL.lua_gettop(L_YXQP); if (QPYX_count_YXQP == 3 && TypeChecker.CheckTypes <UnityEngine.UI.Graphic, UnityEngine.Color, float>(L_YXQP, 1)) { UnityEngine.UI.Image QPYX_obj_YXQP = (UnityEngine.UI.Image)ToLua.ToObject(L_YXQP, 1); UnityEngine.Color QPYX_arg0_YXQP = ToLua.ToColor(L_YXQP, 2); float QPYX_arg1_YXQP = (float)LuaDLL.lua_tonumber(L_YXQP, 3); DG.Tweening.Tweener QPYX_o_YXQP = QPYX_obj_YXQP.DOColor(QPYX_arg0_YXQP, QPYX_arg1_YXQP); ToLua.PushObject(L_YXQP, QPYX_o_YXQP); return(1); } else if (QPYX_count_YXQP == 3 && TypeChecker.CheckTypes <UnityEngine.UI.Image, UnityEngine.Color, float>(L_YXQP, 1)) { UnityEngine.UI.Image QPYX_obj_YXQP = (UnityEngine.UI.Image)ToLua.ToObject(L_YXQP, 1); UnityEngine.Color QPYX_arg0_YXQP = ToLua.ToColor(L_YXQP, 2); float QPYX_arg1_YXQP = (float)LuaDLL.lua_tonumber(L_YXQP, 3); DG.Tweening.Tweener QPYX_o_YXQP = QPYX_obj_YXQP.DOColor(QPYX_arg0_YXQP, QPYX_arg1_YXQP); ToLua.PushObject(L_YXQP, QPYX_o_YXQP); return(1); } else { return(LuaDLL.luaL_throw(L_YXQP, "invalid arguments to method: UnityEngine.UI.Image.DOColor")); } } catch (Exception e_YXQP) { return(LuaDLL.toluaL_exception(L_YXQP, e_YXQP)); } }
private IEnumerator ToFade(float duration, int a, float delay, Action onComplete = null) { bg.color = new Vector4(0, 0, 0, a == 0 ? 1 : 0); Color toColor = new Vector4(0, 0, 0, a); yield return(new WaitForSeconds(delay)); if (a == 1) { bg.gameObject.SetActive(true); } bg.DOColor(toColor, duration).OnComplete( () => { if (onComplete != null) { onComplete(); } if (a != 1) { bg.gameObject.SetActive(false); } } ); }
void ShowJudgement(string name, int fontSize, Color color, Color judgementLineColor) { judgementLabel.text = name; judgementLabel.fontSize = fontSize; judgementLabel.DOKill(); judgementLabel.DOColor(color, judgementScaleTweenDuration); judgementLabel.transform.DOScale(2.6f, judgementScaleTweenDuration).OnComplete(() => { judgementLabel.transform.DOScale(2f, judgementScaleTweenDuration).SetDelay(judgementScaleTweenDelay); judgementLabel.DOFade(0.3f, judgementScaleTweenDuration).SetDelay(judgementScaleTweenDelay).OnComplete(() => { judgementLabelTweener = judgementLabel.DOFade(0, 1).SetDelay(0.5f); }); }); judgementLine.DOColor(judgementLineColor, judgementScaleTweenDuration).OnComplete(() => { judgementLine.DOColor(GameConst.JUDGEMENT_LINE_DEFAULT_COLOR, judgementScaleTweenDuration).SetDelay(judgementScaleTweenDelay); }); }
static int DOColor(IntPtr L) { try { ToLua.CheckArgsCount(L, 3); UnityEngine.UI.Image obj = (UnityEngine.UI.Image)ToLua.CheckObject(L, 1, typeof(UnityEngine.UI.Image)); UnityEngine.Color arg0 = ToLua.ToColor(L, 2); float arg1 = (float)LuaDLL.luaL_checknumber(L, 3); DG.Tweening.Tweener o = obj.DOColor(arg0, arg1); ToLua.PushObject(L, o); return(1); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
/// <summary>Tweens an Image's colors using the given gradient /// (NOTE 1: only uses the colors of the gradient, not the alphas - NOTE 2: creates a Sequence, not a Tweener). /// Also stores the image as the tween's target so it can be used for filtered operations</summary> /// <param name="gradient">The gradient to use</param><param name="duration">The duration of the tween</param> public static Sequence DOGradientColor(this Image target, Gradient gradient, float duration) { Sequence s = DOTween.Sequence(); GradientColorKey[] colors = gradient.colorKeys; int len = colors.Length; for (int i = 0; i < len; ++i) { GradientColorKey c = colors[i]; if (i == 0 && c.time <= 0) { target.color = c.color; continue; } float colorDuration = i == len - 1 ? duration - s.Duration(false) // Verifies that total duration is correct : duration * (i == 0 ? c.time : c.time - colors[i - 1].time); s.Append(target.DOColor(c.color, colorDuration).SetEase(Ease.Linear)); } s.SetTarget(target); return(s); }
public void OnPointerEnter(PointerEventData eventData) { tooltip.DOColor(parchmentColor, .5f); tooltipText.DOColor(Color.black, .5f); }
void AskMeColorTweens() { Background.DOColor(AskMeBackgroundColor, 1f); Buttons[0].Text.DOColor(AskMeTextColor, 1f); }
public void FadeOut(float len) { fadeInCover.DOColor(fadeInColor, len); }
private void ReactionFadeIn(object obj) { black.DOColor(new Color(0, 0, 0, 0), 1f); }