Ejemplo 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());
Ejemplo 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());
Ejemplo 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());
Ejemplo 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());
Ejemplo 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());
Ejemplo 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());
Ejemplo 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());
Ejemplo 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());
Ejemplo 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());