CurveSerializeData

Overview


CurveSerializeData is a class for setting parameter values according to depth as follows.

CurveSerializeData


[System.Serializable]
public class CurveSerializeData
{
  /// <summary>
  /// Basic value.
  /// </summary>
  public float value;

  /// <summary>
  /// Use of curves.
  /// </summary>
  public bool useCurve;

  /// <summary>
  /// Animation curve.
  /// </summary>
  public AnimationCurve curve = AnimationCurve.Linear(0.0f, 1.0f, 1.0f, 1.0f);

  public CurveSerializeData();

  public CurveSerializeData(float value);

  public CurveSerializeData(float value, float curveStart, float curveEnd, bool useCurve = true);

  public CurveSerializeData(float value, AnimationCurve curve);

  public void SetValue(float value);

  public void SetValue(float value, float curveStart, float curveEnd, bool useCurve = true);

  public void SetValue(float value, AnimationCurve curve);

  /// <summary>
  /// Get the current value of Time(0.0 ~ 1.0).
  /// </summary>
  /// <param name="time"></param>
  /// <returns></returns>
  public float Evaluate(float time);
}