public void Show() { if (DOTween.IsTweening(UIInteriorFurnitureChangeScrollList.TweenAnimationType.ShowHide)) { DOTween.Kill(UIInteriorFurnitureChangeScrollList.TweenAnimationType.ShowHide, false); } Tween tween = TweenSettingsExtensions.SetDelay <Tweener>(TweenSettingsExtensions.SetId <Tweener>(DOVirtual.Float(this.mTexture_TouchBackArea.alpha, 0.5f, 0.15f, delegate(float alpha) { this.mTexture_TouchBackArea.alpha = alpha; }), UIInteriorFurnitureChangeScrollList.TweenAnimationType.ShowHide), 0.3f); TweenPosition tweenPosition = UITweener.Begin <TweenPosition>(base.get_gameObject(), 0.3f); tweenPosition.from = base.get_transform().get_localPosition(); tweenPosition.to = new Vector3(0f, base.get_transform().get_localPosition().y, base.get_transform().get_localPosition().z); tweenPosition.ignoreTimeScale = true; }
public void Show(Action shownCallBack) { TweenPosition tweenPosition = UITweener.Begin <TweenPosition>(base.gameObject, 0.3f); tweenPosition.from = mVector3_HidePosition; tweenPosition.to = mVector3_ShowPosition; tweenPosition.ignoreTimeScale = false; tweenPosition.SetOnFinished(delegate { if (shownCallBack != null) { shownCallBack(); } }); tweenPosition.PlayForward(); }
/// <summary> /// 开始位移 /// </summary> /// <param name="go">位移物体</param> /// <param name="dely">延迟时间</param> /// <param name="duration">持续时间</param> /// <param name="start">开始位置</param> /// <param name="end">结束位置</param> /// <returns></returns> static public TweenPosition Begin(GameObject go, float delay, float duration, Vector3 start, Vector3 end) { go.transform.localPosition = start; TweenPosition comp = UITweener.Begin <TweenPosition>(go, delay, duration); comp.from = start; comp.to = end; if (duration <= 0f) { comp.Sample(1f, true); comp.enabled = false; } return(comp); }
static public TweenCurve Begin(GameObject go, float duration, Vector3 to, Vector3 front, Vector3 back) { TweenCurve comp = UITweener.Begin <TweenCurve>(go, duration); comp.from = comp.position; comp.to = to; comp.front = front; comp.back = back; if (duration <= 0f) { comp.Sample(1f, true); comp.enabled = false; } return(comp); }
/// <summary> /// begin the tween (cubic bezier curve) /// </summary> /// <param name="go"></param> /// <param name="duration"></param> /// <param name="targetPoint"></param> /// <returns></returns> static public TweenMaterial Begin(GameObject go, float duration, string propertyName, float destValue) { TweenMaterial comp = UITweener.Begin <TweenMaterial>(go, duration); comp.m_propertyName = propertyName; comp.m_srcValue = comp.value; comp.m_destValue = destValue; if (duration <= 0f) { comp.Sample(1f, true); comp.enabled = false; } return(comp); }
static public TweenRotationEx Begin(GameObject go, float duration, Vector3 midRot, Vector3 rot, float mid) { TweenRotationEx comp = UITweener.Begin <TweenRotationEx>(go, duration); comp.from = comp.rotation.eulerAngles; comp.mid = midRot; comp.to = rot; comp.midPosition = mid; if (duration <= 0f) { comp.Sample(1f, true); comp.enabled = false; } return(comp); }
private IEnumerator StartTransitionClose() { twScaleTitleBg.from = Vector3.one * 1200; twScaleTitleBg.to = Vector3.zero; twScaleTitleBg.delay = 0.2f; twAlphaTitleLbl.from = 1f; twAlphaTitleLbl.to = 0f; twScaleTitleBg.delay = 0f; UITweener.Begin <TweenScale> (twScaleTitleBg.gameObject, twScaleTitleBg.duration); UITweener.Begin <TweenAlpha> (twAlphaTitleLbl.gameObject, twAlphaTitleLbl.duration); while (twScaleTitleBg.enabled || twAlphaTitleLbl.enabled) { yield return(null); } this.objGameTitle.SetActive(false); }
public override void OnFinishedCreateViews() { UIRevampRecipeSummary[] summaryViews = GetSummaryViews(); foreach (UIRevampRecipeSummary uIRevampRecipeSummary in summaryViews) { if (!mRevampSummarySelectableCheckDelegate(uIRevampRecipeSummary)) { uIRevampRecipeSummary.OnDisabled(); } iTween.MoveTo(uIRevampRecipeSummary.gameObject, iTween.Hash("x", 20f, "isLocal", true, "time", 0.3f, "delay", (float)uIRevampRecipeSummary.GetIndex() * 0.1f)); TweenAlpha tweenAlpha = UITweener.Begin <TweenAlpha>(uIRevampRecipeSummary.gameObject, 0.3f); tweenAlpha.from = 0.1f; tweenAlpha.to = 1f; tweenAlpha.delay = (float)uIRevampRecipeSummary.GetIndex() * 0.1f; tweenAlpha.PlayForward(); } }
public static TweenScale Begin(GameObject go, float duration, Vector3 scale) { //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Unknown result type (might be due to invalid IL or missing references) TweenScale tweenScale = UITweener.Begin <TweenScale>(go, duration, true); tweenScale.from = tweenScale.value; tweenScale.to = scale; if (duration <= 0f) { tweenScale.Sample(1f, true); tweenScale.set_enabled(false); } return(tweenScale); }
static public TweenSlider Begin(UISlider slider, float duration, float value) { TweenSlider comp = UITweener.Begin <TweenSlider>(slider.gameObject, duration); if (comp != null) { comp.from = comp.Value; comp.to = value; comp.slider = slider; if (duration <= 0.0f) { comp.Sample(1.0f, true); comp.enabled = false; } } return(comp); }
public static TweenPosition Begin(GameObject go, float duration, Vector3 pos) { //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Unknown result type (might be due to invalid IL or missing references) TweenPosition tweenPosition = UITweener.Begin <TweenPosition>(go, duration, true); tweenPosition.from = tweenPosition.value; tweenPosition.to = pos; if (duration <= 0f) { tweenPosition.Sample(1f, true); tweenPosition.set_enabled(false); } return(tweenPosition); }
/// <summary> /// begin the tween (cubic bezier curve) /// </summary> /// <param name="go"></param> /// <param name="duration"></param> /// <param name="targetPoint"></param> /// <returns></returns> static public TweenBezier Begin(GameObject go, float duration, Vector3 controlPoint1, Vector3 controlPoint2, Vector3 targetPoint) { TweenBezier comp = UITweener.Begin <TweenBezier>(go, duration); comp.m_type = eCurveType.CUBIC; comp.p0 = comp.value; comp.p1 = controlPoint1; comp.p2 = controlPoint2; comp.p3 = targetPoint; if (duration <= 0f) { comp.Sample(1f, true); comp.enabled = false; } return(comp); }
private void AnimationClose(Action action) { TweenAlpha tweenAlpha = UITweener.Begin <TweenAlpha>(base.gameObject, 0.3f); tweenAlpha.from = 1f; tweenAlpha.to = 0.01f; tweenAlpha.ignoreTimeScale = false; tweenAlpha.SetOnFinished(delegate { if (action != null) { action(); } UnityEngine.Object.Destroy(tweenAlpha); }); tweenAlpha.PlayForward(); }
static public TweenPosition Begin(GameObject go, float duration, Vector3 pos, EventDelegate finish) { TweenPosition comp = UITweener.Begin <TweenPosition>(go, duration); comp.from = comp.value; comp.to = pos; comp.onFinished = new System.Collections.Generic.List <EventDelegate>() { finish }; if (duration <= 0f) { comp.Sample(1f, true); comp.enabled = false; } return(comp); }
public void Show() { if (DOTween.IsTweening(TweenAnimationType.ShowHide)) { DOTween.Kill(TweenAnimationType.ShowHide); } TweenPosition tweenPosition = UITweener.Begin <TweenPosition>(base.gameObject, 0.3f); tweenPosition.from = base.transform.localPosition; TweenPosition tweenPosition2 = tweenPosition; Vector3 localPosition = base.transform.localPosition; float y = localPosition.y; Vector3 localPosition2 = base.transform.localPosition; tweenPosition2.to = new Vector3(0f, y, localPosition2.z); tweenPosition.ignoreTimeScale = true; }
/// <summary> /// Start the tweening operation. /// </summary> static public TweenWidget Begin(GameObject go, float duration, Vector3 scale, BoxCollider collider, Vector3 colliderSize, Vector3 originScale) { TweenWidget comp = UITweener.Begin <TweenWidget>(go, duration); comp.from = comp.value; comp.to = scale; comp.mCollider = collider; comp.colliderSize = colliderSize; comp.originScale = originScale; if (duration <= 0f) { comp.Sample(1f, true); comp.enabled = false; } return(comp); }
static public TweenColor Begin3(GameObject go, float duration, Color from, Color to) { TweenColor comp = UITweener.Begin <TweenColor>(go, duration); comp.from = from; comp.to = to; comp.style = Style.Once; comp.animationCurve = new AnimationCurve(new Keyframe(0f, 0f), new Keyframe(0.5f, 1f), new Keyframe(1f, 0f)); if (duration <= 0f) { comp.Sample(1f, true); comp.enabled = false; } return(comp); }
public static TweenColor Begin(GameObject go, float duration, Color color) { //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Unknown result type (might be due to invalid IL or missing references) TweenColor tweenColor = UITweener.Begin <TweenColor>(go, duration, true); tweenColor.from = tweenColor.value; tweenColor.to = color; if (duration <= 0f) { tweenColor.Sample(1f, true); tweenColor.set_enabled(false); } return(tweenColor); }
/// <summary> /// Start the tweening operation. /// </summary> static public TweenScaleEx Begin(GameObject go, float duration, Vector3 scaleMid, Vector3 scaleEnd, float mid) { TweenScaleEx comp = UITweener.Begin <TweenScaleEx>(go, duration); comp.from = comp.scale; comp.mid = scaleMid; comp.to = scaleEnd; comp.midPosition = mid; if (duration <= 0f) { comp.Sample(1f, true); comp.enabled = false; } return(comp); }
/// <summary> /// Start the tweening operation. /// </summary> static public TweenPositionEx Begin(GameObject go, float duration, Vector3 mid, Vector3 pos, float midPosition) { TweenPositionEx comp = UITweener.Begin <TweenPositionEx>(go, duration); comp.from = comp.position; comp.mid = mid; comp.to = pos; comp.midPosition = midPosition; if (duration <= 0f) { comp.Sample(1f, true); comp.enabled = false; } return(comp); }
/// <summary> /// Start the tweening operation. /// </summary> static public TweenFloat Begin(GameObject go, Component com, string cName, float duration, float target) { TweenFloat comp = UITweener.Begin <TweenFloat>(go, duration); comp.prf = new PropertyReference(); comp.prf.Set(com, cName); comp.from = comp.value; comp.to = target; if (duration <= 0f) { comp.Sample(1f, true); comp.enabled = false; } return(comp); }
/// <summary> /// Start the tweening operation. /// </summary> static public TweenJump Begin(GameObject go, float duration, Vector3 pos, float heights, float nJumps) { TweenJump comp = UITweener.Begin <TweenJump>(go, duration); comp.from = comp.value; comp.m_delta = pos; comp.mHeight = heights; comp.m_nJumps = nJumps; if (duration <= 0f) { comp.Sample(1f, true); comp.enabled = false; } return(comp); }
/// <summary> /// Start the tweening operation. /// </summary> static public TweenFill Begin(GameObject go, float duration) { TweenFill comp = UITweener.Begin <TweenFill>(go, duration); comp.Fill = comp.from; if (duration <= 0f) { comp.Sample(1f, true); comp.enabled = false; } else { comp.enabled = true; } return(comp); }
/// <summary> /// Start the tweening operation. /// </summary> static public TweenColor Begin(GameObject go, float duration, Color color) { #if UNITY_EDITOR if (!Application.isPlaying) { return(null); } #endif TweenColor comp = UITweener.Begin <TweenColor>(go, duration); comp.from = comp.value; comp.to = color; if (duration <= 0f) { comp.Sample(1f, true); comp.enabled = false; } return(comp); }
/// <summary> /// Start the tweening operation. /// </summary> static public TweenGradientColor Begin(GameObject go, float duration, Gradient gradient) { #if UNITY_EDITOR if (!Application.isPlaying) { return(null); } #endif TweenGradientColor comp = UITweener.Begin <TweenGradientColor>(go, duration); comp.gradient = gradient; if (duration <= 0f) { comp.Sample(1f, true); comp.enabled = false; } return(comp); }
static public TweenAttr2 Begin(GameObject go, SetAttr fnAttr, float duration, float from, float to) { TweenAttr2 comp = UITweener.Begin <TweenAttr2>(go, duration); comp.from = from; comp.to = to; comp.count = to - from; comp.fnAttr = fnAttr; //comp.value = from; if (duration <= 0f) { comp.Sample(1f, true); comp.enabled = false; } return(comp); }
private void AnimationClose(Action action) { TweenPosition moveTween = UITweener.Begin <TweenPosition>(base.gameObject, 0.4f); Vector3 from = mStartLocalPosition; Vector3 to = mOutDisplayPosition; moveTween.ignoreTimeScale = false; moveTween.from = from; moveTween.to = to; moveTween.SetOnFinished(delegate { if (action != null) { action(); } UnityEngine.Object.Destroy(moveTween); }); }
private IEnumerator StartTransitionOpen() { this.FixSizeWidth(); this.objGameTitle.SetActive(true); twScaleTitleBg.from = Vector3.zero; twScaleTitleBg.to = Vector3.one * 1500; twScaleTitleBg.delay = 0f; twAlphaTitleLbl.from = 0f; twAlphaTitleLbl.to = 1f; twAlphaTitleLbl.delay = 0.2f; UITweener.Begin <TweenScale> (twScaleTitleBg.gameObject, twScaleTitleBg.duration); UITweener.Begin <TweenAlpha> (twAlphaTitleLbl.gameObject, twAlphaTitleLbl.duration); while (twScaleTitleBg.enabled || twAlphaTitleLbl.enabled) { yield return(null); } }
private void AnimationClose(Action action) { TweenScale scaleTween = UITweener.Begin <TweenScale>(base.gameObject, 0.4f); Vector3 localScale = base.gameObject.transform.localScale; Vector3 zero = Vector3.zero; scaleTween.ignoreTimeScale = false; scaleTween.from = localScale; scaleTween.to = zero; scaleTween.SetOnFinished(delegate { if (action != null) { action(); } UnityEngine.Object.Destroy(scaleTween); }); }
/// <summary> /// Start the tweening operation. /// </summary> static public TweenText Begin(UILabel label, float duration, int startNumber, int endNumber, float delay = 0f) { TweenText comp = UITweener.Begin <TweenText>(label.gameObject, duration); comp.Label = label; comp.from = startNumber; comp.to = endNumber; if (delay != 0) { comp.delay = delay; } if (duration <= 0f) { comp.Sample(1f, true); comp.enabled = false; } return(comp); }