Пример #1
0
 public static float Ease(float currentTime, float startValue, float changeNeeded, float duration)
 {
     if (currentTime < duration / 2)
     {
         return(TweenEaseInBounceEffect.Ease(currentTime * 2, 0, changeNeeded, duration) * 0.5f + startValue);
     }
     return(TweenEaseOutBounceEffect.Ease(currentTime * 2 - duration, 0, changeNeeded, duration) * 0.5f + changeNeeded * 0.5f + startValue);
 }
Пример #2
0
 public static float Ease(float currentTime, float startValue, float changeNeeded, float duration)
 {
     if (currentTime < duration / 2)
     {
         return(TweenEaseOutBounceEffect.Ease(currentTime * 2, startValue, changeNeeded / 2, duration));
     }
     return(TweenEaseInBounceEffect.Ease((currentTime * 2) - duration, startValue + changeNeeded / 2, changeNeeded / 2, duration));
 }
Пример #3
0
 public static float Ease(float currentTime, float startValue, float changeNeeded, float duration)
 {
     return(changeNeeded - TweenEaseOutBounceEffect.Ease(duration - currentTime, 0, changeNeeded, duration) + startValue);
 }