using System; using UnityEngine; namespace Tweening { public sealed class SpriteRendererSpriteTweenerTrack : TweenerTrack { public override void UpdateComponentValue(float evaluatedTime) { if (Mathf.Approximately(Mathf.LerpUnclamped(0f, 1f, evaluatedTime), 1f)) { this._component.sprite = this._to; } } public override void ResetComponentValue() { if (this._dynamicFrom) { this._from = this._component.sprite; } else { this._component.sprite = this._from; } } public override void InitializeComponentValue() { if (this._dynamicFrom) { this._from = this._component.sprite; } else { this._component.sprite = this._from; } } } }