コード例 #1
0
 public LerpCoroutine(float duration, ILerp <T> lerper, Func <float, float> function, Action <T> action) : base()
 {
     this.duration = duration > 0F ? duration : Mathf.Epsilon;
     this.action   = (t) =>
     {
         InterpolatedValue = lerper.Lerp(t, function);
         action(InterpolatedValue);
     };
 }
コード例 #2
0
 public LerpCoroutine(MonoBehaviour behaviour, float duration, ILerp <T> lerper, Easing.Functions function, Action <T> action) : base(behaviour)
 {
     this.duration = duration > 0F ? duration : Mathf.Epsilon;
     this.action   = (t) =>
     {
         InterpolatedValue = lerper.Lerp(t, Easing.Get(function));
         action(InterpolatedValue);
     };
 }
コード例 #3
0
ファイル: HMath.cs プロジェクト: hartontw/UnityExtended
 /// <summary>
 /// Linearly interpolates a range by t.
 /// </summary>
 public static T Lerp <T>(ILerp <T> range, float t)
 {
     return(range.Lerp(t));
 }
コード例 #4
0
 /// <summary>
 ///
 /// </summary>
 public static T Lerp <T>(ILerp <T> value)
 {
     return(value.Lerp(Value));
 }