|
- using System;
- using Tweening.Extensions;
- using UnityEngine;
- using UnityEngine.UI;
-
- namespace Tweening
- {
- public sealed class ShadowAlphaTweenerTrack : TweenerTrack<Shadow, float>
- {
- public override void UpdateComponentValue(float evaluatedTime)
- {
- this._component.UpdateColorAlpha(Mathf.LerpUnclamped(this._from, this._to, evaluatedTime));
- }
-
- public override void ResetComponentValue()
- {
- if (this._dynamicFrom)
- {
- this._from = this._component.effectColor.a;
- }
- else
- {
- this._component.UpdateColorAlpha(this._from);
- }
- }
-
- public override void InitializeComponentValue()
- {
- if (this._dynamicFrom)
- {
- this._from = this._component.effectColor.a;
- }
- else
- {
- this._component.UpdateColorAlpha(this._from);
- }
- }
- }
- }
|