using System; using Tweening.Extensions; using UnityEngine; namespace Tweening { public sealed class RectTransformPositionXTweenerTrack : TweenerTrack { public override void UpdateComponentValue(float evaluatedTime) { this._component.UpdatePositionX(Mathf.LerpUnclamped(this._from, this._to.position.x, evaluatedTime)); } public override void ResetComponentValue() { if (this._dynamicFrom) { this._from = this._component.position.x; } else { this._component.UpdatePositionX(this._from); } } public override void InitializeComponentValue() { if (this._dynamicFrom) { this._from = this._component.position.x; } else { this._component.UpdatePositionX(this._from); } } } }