hch
2025-09-04 62188b271cce5e3aec5ca40d58c30f08643e2f60
Main/Component/UI/Decorate/Tweens/PositionTween.cs
@@ -1,45 +1,45 @@
using UnityEngine;
using System.Collections;
    public class PositionTween : TweenEx
public class PositionTween : TweenEx
{
    public override void SetStartState()
    {
        base.SetStartState();
        this.rectTransform.anchoredPosition = from;
    }
        public override void SetStartState()
    public override void SetEndState()
    {
        base.SetEndState();
        this.rectTransform.anchoredPosition = to;
    }
    protected override void OnPrepare()
    {
        base.OnPrepare();
        this.rectTransform.anchoredPosition = reversal ? to : from;
    }
    protected override void OnOnceEnd()
    {
        if (wrapMode == WrapMode.PingPongOnce)
        {
            base.SetStartState();
            this.rectTransform.anchoredPosition = from;
            SetStartState();
        }
        public override void SetEndState()
        {
            base.SetEndState();
            this.rectTransform.anchoredPosition = to;
        else
        {
            this.rectTransform.anchoredPosition = reversal ? from : to;
        }
        base.OnOnceEnd();
        protected override void OnPrepare()
        {
            base.OnPrepare();
            this.rectTransform.anchoredPosition = reversal ? to : from;
        }
    }
        protected override void OnOnceEnd()
        {
            if (wrapMode == WrapMode.PingPongOnce)
            {
                SetStartState();
            }
            else
            {
                this.rectTransform.anchoredPosition = reversal ? from : to;
            }
    protected override void UpdateVector3()
    {
        base.UpdateVector3();
        this.rectTransform.anchoredPosition = CalculateVector3();
    }
            base.OnOnceEnd();
        }
        protected override void UpdateVector3()
        {
            base.UpdateVector3();
            this.rectTransform.anchoredPosition = CalculateVector3();
        }
    }
}