public float GetValueByTimeRatio(float ratio) { switch (type) { case FlexibleEditType.Uniform: return(uniformValue); case FlexibleEditType.RangeTween: return(rangeValue.Evaluate(ratio)); case FlexibleEditType.RangeRandom: return(rangeValue.random); case FlexibleEditType.Curve: return(curveValue.Evaluate(ratio)); } return(uniformValue); }
public Vector3 GetValueByTimeRatio(float ratio) { switch (type) { case FlexibleEditType.Uniform: return(uniformValue); case FlexibleEditType.RangeTween: return(new Vector3(rangeX.Evaluate(ratio), rangeY.Evaluate(ratio), rangeZ.Evaluate(ratio))); case FlexibleEditType.RangeRandom: return(new Vector3(rangeX.random, rangeY.random, rangeZ.random)); case FlexibleEditType.Curve: return(new Vector3(curveX.Evaluate(ratio), curveY.Evaluate(ratio), curveZ.Evaluate(ratio))); } return(uniformValue); }