wip : lighting theatre & integrations
This commit is contained in:
@@ -45,12 +45,6 @@ namespace OctoCore.Components
|
||||
[Tooltip("Custom animation curve")]
|
||||
public AnimationCurve Curve = AnimationCurve.EaseInOut(0, 0, 1, 1);
|
||||
|
||||
[Tooltip("Play on Awake")]
|
||||
public bool PlayOnAwake = true;
|
||||
|
||||
[Tooltip("Delay before playing (seconds)")]
|
||||
public float Delay = 0f;
|
||||
|
||||
[Tooltip("Random Time Offset")]
|
||||
public bool RandomOffset = true;
|
||||
|
||||
@@ -90,25 +84,6 @@ namespace OctoCore.Components
|
||||
private bool _started;
|
||||
private float _timeOffset;
|
||||
|
||||
void OnDrawGizmosSelected()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void OnEnable()
|
||||
{
|
||||
_timeOffset = Time.timeSinceLevelLoad;
|
||||
_started = false;
|
||||
|
||||
if (_settings.PlayOnAwake)
|
||||
{
|
||||
if (_settings.Delay > 0f)
|
||||
StartCoroutine(DelayedStart());
|
||||
else
|
||||
_started = true;
|
||||
}
|
||||
}
|
||||
|
||||
void Start()
|
||||
{
|
||||
_state.InitialPosition = transform.localPosition;
|
||||
@@ -168,16 +143,6 @@ namespace OctoCore.Components
|
||||
enabled = !paused;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Waits for the configured delay then starts the animation.
|
||||
/// </summary>
|
||||
private System.Collections.IEnumerator DelayedStart()
|
||||
{
|
||||
yield return new WaitForSeconds(_settings.Delay);
|
||||
_timeOffset = Time.timeSinceLevelLoad;
|
||||
_started = true;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets normalized time [0,1] based on animation type.
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user