Esempio n. 1
0
 public static IEnumerator Tween(this Variable <float> variable, float end, float time, CurveType curveType = default)
 => variable.Tween(variable.Value, end, time, Mathf.Lerp, curveType.GetCurve());
Esempio n. 2
0
 public static IEnumerator Tween(this Variable <int> variable, int end, float time, CurveType curveType = default, CastType castType = default)
 => variable.Tween(variable.Value, end, time, (s, e, t) => castType.Cast(Mathf.Lerp(s, e, t)), curveType.GetCurve());
Esempio n. 3
0
 public static IEnumerator Tween(this Variable <Quaternion> variable, Quaternion start, Quaternion end, float time, CurveType curveType = default)
 => variable.Tween(start, end, time, Quaternion.Lerp, curveType.GetCurve());
Esempio n. 4
0
 public static IEnumerator TweenSlerp(this Variable <Quaternion> variable, Quaternion end, float time, CurveType curveType = default)
 => variable.Tween(variable.Value, end, time, Quaternion.Slerp, curveType.GetCurve());
Esempio n. 5
0
 public static IEnumerator TweenSlerp(this Variable <Vector3Int> variable, Vector3Int end, float time, CurveType curveType = default, CastType castType = default)
 => variable.Tween(variable.Value, end, time, (s, e, t) => castType.Cast(Vector3.Slerp(s, e, t)), curveType.GetCurve());
Esempio n. 6
0
 public static IEnumerator TweenSlerp(this Variable <Vector3> variable, Vector3 end, float time, CurveType curveType = default)
 => variable.Tween(variable.Value, end, time, Vector3.Slerp, curveType.GetCurve());
Esempio n. 7
0
 public static IEnumerator Tween(this Variable <Vector3> variable, Vector3 start, Vector3 end, float time, CurveType curveType = default)
 => variable.Tween(start, end, time, Vector3.Lerp, curveType.GetCurve());
Esempio n. 8
0
 public static IEnumerator Tween(this Variable <Vector2Int> variable, Vector2Int start, Vector2Int end, float time, CurveType curveType = default, CastType castType = default)
 => variable.Tween(start, end, time, (s, e, t) => castType.Cast(Vector2.Lerp(s, e, t)), curveType.GetCurve());
Esempio n. 9
0
 public static IEnumerator Tween(this Variable <Color> variable, Color start, Color end, float time, CurveType curveType = default)
 => variable.Tween(start, end, time, Color.Lerp, curveType.GetCurve());