|
- using System;
- using UnityEngine;
-
- namespace Tweening
- {
- public sealed class TransformLocalPositionTweenerTrack : TweenerTrack<Transform, Vector3>
- {
- public override void UpdateComponentValue(float evaluatedTime)
- {
- this._component.localPosition = Vector3.LerpUnclamped(this._from, this._to, evaluatedTime);
- }
-
- public override void ResetComponentValue()
- {
- if (this._dynamicFrom)
- {
- this._from = this._component.localPosition;
- }
- else
- {
- this._component.localPosition = this._from;
- }
- }
-
- public override void InitializeComponentValue()
- {
- if (this._dynamicFrom)
- {
- this._from = this._component.localPosition;
- }
- else
- {
- this._component.localPosition = this._from;
- }
- }
- }
- }
|