|
- using System;
- using UnityEngine;
-
- namespace Tweening
- {
- public abstract class TweenerTrackBase : MonoBehaviour
- {
- public float Delay
- {
- get
- {
- return this._delay;
- }
- }
-
- public float Duration
- {
- get
- {
- return this._duration;
- }
- }
-
- public float EndTime
- {
- get
- {
- return this._delay + this._duration;
- }
- }
-
- public AnimationCurve Curve
- {
- get
- {
- return this._curve;
- }
- }
-
- public abstract void UpdateComponentValue(float evaluatedTime);
-
- public abstract void InitializeComponentValue();
-
- public abstract void ResetComponentValue();
-
- public void ResetTrack()
- {
- this._initialized = false;
- this.ResetComponentValue();
- }
-
- public void InitializeTrack()
- {
- if (this._initialized)
- {
- return;
- }
- this.InitializeComponentValue();
- this._initialized = true;
- }
-
- [SerializeField]
- private float _delay;
-
- [SerializeField]
- private float _duration;
-
- [SerializeField]
- private AnimationCurve _curve = AnimationCurve.EaseInOut(0f, 0f, 1f, 1f);
-
- private bool _initialized;
- }
- }
|