helper with a single method that takes in an EaseType and applies that ease equation with the given duration and time parameters. We do this to avoid passing around Funcs which create bogs of trash for the garbage collector (function pointers please!)
Exemplo n.º 1
0
 public static Rectangle ease(EaseType easeType, ref Rectangle from, ref Rectangle to, float t, float duration)
 {
     return(unclampedLerp(ref from, ref to, EaseHelper.ease(easeType, t, duration)));
 }
Exemplo n.º 2
0
 public static Quaternion ease(EaseType easeType, Quaternion from, Quaternion to, float t, float duration)
 {
     return(Quaternion.Lerp(from, to, EaseHelper.ease(easeType, t, duration)));
 }
Exemplo n.º 3
0
 public static Color ease(EaseType easeType, ref Color from, ref Color to, float t, float duration)
 {
     return(unclampedLerp(ref from, ref to, EaseHelper.ease(easeType, t, duration)));
 }
Exemplo n.º 4
0
 public static float ease(EaseType easeType, float from, float to, float t, float duration)
 {
     return(unclampedLerp(from, to, EaseHelper.ease(easeType, t, duration)));
 }
Exemplo n.º 5
0
 public static Vector4 ease(EaseType easeType, Vector4 from, Vector4 to, float t, float duration)
 {
     return(unclampedLerp(from, to, EaseHelper.ease(easeType, t, duration)));
 }
 public static Rectangle ease(EaseType easeType, Rectangle from, Rectangle to, float t, float duration)
 {
     return(lerp(from, to, EaseHelper.ease(easeType, t, duration)));
 }
 public static Color ease(EaseType easeType, Color from, Color to, float t, float duration)
 {
     return(lerp(from, to, EaseHelper.ease(easeType, t, duration)));
 }
 public static Vector2 easeAngle(EaseType easeType, Vector2 from, Vector2 to, float t, float duration)
 {
     return(angleLerp(from, to, EaseHelper.ease(easeType, t, duration)));
 }
 public static Vector3 ease(EaseType easeType, Vector3 from, Vector3 to, float t, float duration)
 {
     return(lerp(from, to, EaseHelper.ease(easeType, t, duration)));
 }
Exemplo n.º 10
0
 public static System.Numerics.Vector2 EaseAngle(EaseType easeType, System.Numerics.Vector2 from, System.Numerics.Vector2 to, float t, float duration)
 {
     return(AngleLerp(from, to, EaseHelper.Ease(easeType, t, duration)));
 }