public static IObservable <float> EaseInOutBack(float duration, float overshoot = DefaultOvershoot, bool ignoreTimeScale = false) { return(ObservableTween.CreateObservable(EasingFunctions.EaseInOutBack(overshoot), duration, ignoreTimeScale)); }
public static IObservable <float> EaseInOutElastic(float duration, float amplitude = DefaultAmplitude, float period = DefaultPeriod, bool ignoreTimeScale = false) { return(ObservableTween.CreateObservable(EasingFunctions.EaseInOutElastic(amplitude, period), duration, ignoreTimeScale)); }
public static EasingFunction EaseInOutElastic(float amplitude = 1.70158f, float period = 0.0f) { return((double)amplitude == 1.70158004760742 && (double)period == 0.0 ? EasingFunctions.defaultEaseInOutElastic : (EasingFunction)((time, duration) => EasingFunctions.EaseInOutElastic_(time, duration, amplitude, period))); }
public static EasingFunction EaseInOutBack(float overshoot = 1.70158f) { return((double)overshoot == 1.70158004760742 ? EasingFunctions.defaultEaseInOutBack : (EasingFunction)((time, duration) => EasingFunctions.EaseInOutBack_(time, duration, overshoot))); }
static EasingFunctions() { // ISSUE: reference to a compiler-generated field if (EasingFunctions.\u003C\u003Ef__mg\u0024cache0 == null) { // ISSUE: reference to a compiler-generated field EasingFunctions.\u003C\u003Ef__mg\u0024cache0 = new EasingFunction(EasingFunctions.Linear_); } // ISSUE: reference to a compiler-generated field EasingFunctions.Linear = EasingFunctions.\u003C\u003Ef__mg\u0024cache0; // ISSUE: reference to a compiler-generated field if (EasingFunctions.\u003C\u003Ef__mg\u0024cache1 == null) { // ISSUE: reference to a compiler-generated field EasingFunctions.\u003C\u003Ef__mg\u0024cache1 = new EasingFunction(EasingFunctions.EaseInSine_); } // ISSUE: reference to a compiler-generated field EasingFunctions.EaseInSine = EasingFunctions.\u003C\u003Ef__mg\u0024cache1; // ISSUE: reference to a compiler-generated field if (EasingFunctions.\u003C\u003Ef__mg\u0024cache2 == null) { // ISSUE: reference to a compiler-generated field EasingFunctions.\u003C\u003Ef__mg\u0024cache2 = new EasingFunction(EasingFunctions.EaseOutSine_); } // ISSUE: reference to a compiler-generated field EasingFunctions.EaseOutSine = EasingFunctions.\u003C\u003Ef__mg\u0024cache2; // ISSUE: reference to a compiler-generated field if (EasingFunctions.\u003C\u003Ef__mg\u0024cache3 == null) { // ISSUE: reference to a compiler-generated field EasingFunctions.\u003C\u003Ef__mg\u0024cache3 = new EasingFunction(EasingFunctions.EaseInOutSine_); } // ISSUE: reference to a compiler-generated field EasingFunctions.EaseInOutSine = EasingFunctions.\u003C\u003Ef__mg\u0024cache3; // ISSUE: reference to a compiler-generated field if (EasingFunctions.\u003C\u003Ef__mg\u0024cache4 == null) { // ISSUE: reference to a compiler-generated field EasingFunctions.\u003C\u003Ef__mg\u0024cache4 = new EasingFunction(EasingFunctions.EaseInQuad_); } // ISSUE: reference to a compiler-generated field EasingFunctions.EaseInQuad = EasingFunctions.\u003C\u003Ef__mg\u0024cache4; // ISSUE: reference to a compiler-generated field if (EasingFunctions.\u003C\u003Ef__mg\u0024cache5 == null) { // ISSUE: reference to a compiler-generated field EasingFunctions.\u003C\u003Ef__mg\u0024cache5 = new EasingFunction(EasingFunctions.EaseOutQuad_); } // ISSUE: reference to a compiler-generated field EasingFunctions.EaseOutQuad = EasingFunctions.\u003C\u003Ef__mg\u0024cache5; // ISSUE: reference to a compiler-generated field if (EasingFunctions.\u003C\u003Ef__mg\u0024cache6 == null) { // ISSUE: reference to a compiler-generated field EasingFunctions.\u003C\u003Ef__mg\u0024cache6 = new EasingFunction(EasingFunctions.EaseInOutQuad_); } // ISSUE: reference to a compiler-generated field EasingFunctions.EaseInOutQuad = EasingFunctions.\u003C\u003Ef__mg\u0024cache6; // ISSUE: reference to a compiler-generated field if (EasingFunctions.\u003C\u003Ef__mg\u0024cache7 == null) { // ISSUE: reference to a compiler-generated field EasingFunctions.\u003C\u003Ef__mg\u0024cache7 = new EasingFunction(EasingFunctions.EaseInCubic_); } // ISSUE: reference to a compiler-generated field EasingFunctions.EaseInCubic = EasingFunctions.\u003C\u003Ef__mg\u0024cache7; // ISSUE: reference to a compiler-generated field if (EasingFunctions.\u003C\u003Ef__mg\u0024cache8 == null) { // ISSUE: reference to a compiler-generated field EasingFunctions.\u003C\u003Ef__mg\u0024cache8 = new EasingFunction(EasingFunctions.EaseOutCubic_); } // ISSUE: reference to a compiler-generated field EasingFunctions.EaseOutCubic = EasingFunctions.\u003C\u003Ef__mg\u0024cache8; // ISSUE: reference to a compiler-generated field if (EasingFunctions.\u003C\u003Ef__mg\u0024cache9 == null) { // ISSUE: reference to a compiler-generated field EasingFunctions.\u003C\u003Ef__mg\u0024cache9 = new EasingFunction(EasingFunctions.EaseInOutCubic_); } // ISSUE: reference to a compiler-generated field EasingFunctions.EaseInOutCubic = EasingFunctions.\u003C\u003Ef__mg\u0024cache9; // ISSUE: reference to a compiler-generated field if (EasingFunctions.\u003C\u003Ef__mg\u0024cacheA == null) { // ISSUE: reference to a compiler-generated field EasingFunctions.\u003C\u003Ef__mg\u0024cacheA = new EasingFunction(EasingFunctions.EaseInQuart_); } // ISSUE: reference to a compiler-generated field EasingFunctions.EaseInQuart = EasingFunctions.\u003C\u003Ef__mg\u0024cacheA; // ISSUE: reference to a compiler-generated field if (EasingFunctions.\u003C\u003Ef__mg\u0024cacheB == null) { // ISSUE: reference to a compiler-generated field EasingFunctions.\u003C\u003Ef__mg\u0024cacheB = new EasingFunction(EasingFunctions.EaseOutQuart_); } // ISSUE: reference to a compiler-generated field EasingFunctions.EaseOutQuart = EasingFunctions.\u003C\u003Ef__mg\u0024cacheB; // ISSUE: reference to a compiler-generated field if (EasingFunctions.\u003C\u003Ef__mg\u0024cacheC == null) { // ISSUE: reference to a compiler-generated field EasingFunctions.\u003C\u003Ef__mg\u0024cacheC = new EasingFunction(EasingFunctions.EaseInOutQuart_); } // ISSUE: reference to a compiler-generated field EasingFunctions.EaseInOutQuart = EasingFunctions.\u003C\u003Ef__mg\u0024cacheC; // ISSUE: reference to a compiler-generated field if (EasingFunctions.\u003C\u003Ef__mg\u0024cacheD == null) { // ISSUE: reference to a compiler-generated field EasingFunctions.\u003C\u003Ef__mg\u0024cacheD = new EasingFunction(EasingFunctions.EaseInQuint_); } // ISSUE: reference to a compiler-generated field EasingFunctions.EaseInQuint = EasingFunctions.\u003C\u003Ef__mg\u0024cacheD; // ISSUE: reference to a compiler-generated field if (EasingFunctions.\u003C\u003Ef__mg\u0024cacheE == null) { // ISSUE: reference to a compiler-generated field EasingFunctions.\u003C\u003Ef__mg\u0024cacheE = new EasingFunction(EasingFunctions.EaseOutQuint_); } // ISSUE: reference to a compiler-generated field EasingFunctions.EaseOutQuint = EasingFunctions.\u003C\u003Ef__mg\u0024cacheE; // ISSUE: reference to a compiler-generated field if (EasingFunctions.\u003C\u003Ef__mg\u0024cacheF == null) { // ISSUE: reference to a compiler-generated field EasingFunctions.\u003C\u003Ef__mg\u0024cacheF = new EasingFunction(EasingFunctions.EaseInOutQuint_); } // ISSUE: reference to a compiler-generated field EasingFunctions.EaseInOutQuint = EasingFunctions.\u003C\u003Ef__mg\u0024cacheF; // ISSUE: reference to a compiler-generated field if (EasingFunctions.\u003C\u003Ef__mg\u0024cache10 == null) { // ISSUE: reference to a compiler-generated field EasingFunctions.\u003C\u003Ef__mg\u0024cache10 = new EasingFunction(EasingFunctions.EaseInExpo_); } // ISSUE: reference to a compiler-generated field EasingFunctions.EaseInExpo = EasingFunctions.\u003C\u003Ef__mg\u0024cache10; // ISSUE: reference to a compiler-generated field if (EasingFunctions.\u003C\u003Ef__mg\u0024cache11 == null) { // ISSUE: reference to a compiler-generated field EasingFunctions.\u003C\u003Ef__mg\u0024cache11 = new EasingFunction(EasingFunctions.EaseOutExpo_); } // ISSUE: reference to a compiler-generated field EasingFunctions.EaseOutExpo = EasingFunctions.\u003C\u003Ef__mg\u0024cache11; // ISSUE: reference to a compiler-generated field if (EasingFunctions.\u003C\u003Ef__mg\u0024cache12 == null) { // ISSUE: reference to a compiler-generated field EasingFunctions.\u003C\u003Ef__mg\u0024cache12 = new EasingFunction(EasingFunctions.EaseInOutExpo_); } // ISSUE: reference to a compiler-generated field EasingFunctions.EaseInOutExpo = EasingFunctions.\u003C\u003Ef__mg\u0024cache12; // ISSUE: reference to a compiler-generated field if (EasingFunctions.\u003C\u003Ef__mg\u0024cache13 == null) { // ISSUE: reference to a compiler-generated field EasingFunctions.\u003C\u003Ef__mg\u0024cache13 = new EasingFunction(EasingFunctions.EaseInCirc_); } // ISSUE: reference to a compiler-generated field EasingFunctions.EaseInCirc = EasingFunctions.\u003C\u003Ef__mg\u0024cache13; // ISSUE: reference to a compiler-generated field if (EasingFunctions.\u003C\u003Ef__mg\u0024cache14 == null) { // ISSUE: reference to a compiler-generated field EasingFunctions.\u003C\u003Ef__mg\u0024cache14 = new EasingFunction(EasingFunctions.EaseOutCirc_); } // ISSUE: reference to a compiler-generated field EasingFunctions.EaseOutCirc = EasingFunctions.\u003C\u003Ef__mg\u0024cache14; // ISSUE: reference to a compiler-generated field if (EasingFunctions.\u003C\u003Ef__mg\u0024cache15 == null) { // ISSUE: reference to a compiler-generated field EasingFunctions.\u003C\u003Ef__mg\u0024cache15 = new EasingFunction(EasingFunctions.EaseInOutCirc_); } // ISSUE: reference to a compiler-generated field EasingFunctions.EaseInOutCirc = EasingFunctions.\u003C\u003Ef__mg\u0024cache15; // ISSUE: reference to a compiler-generated field if (EasingFunctions.\u003C\u003Ef__mg\u0024cache16 == null) { // ISSUE: reference to a compiler-generated field EasingFunctions.\u003C\u003Ef__mg\u0024cache16 = new EasingFunction(EasingFunctions.EaseInBounce_); } // ISSUE: reference to a compiler-generated field EasingFunctions.EaseInBounce = EasingFunctions.\u003C\u003Ef__mg\u0024cache16; // ISSUE: reference to a compiler-generated field if (EasingFunctions.\u003C\u003Ef__mg\u0024cache17 == null) { // ISSUE: reference to a compiler-generated field EasingFunctions.\u003C\u003Ef__mg\u0024cache17 = new EasingFunction(EasingFunctions.EaseOutBounce_); } // ISSUE: reference to a compiler-generated field EasingFunctions.EaseOutBounce = EasingFunctions.\u003C\u003Ef__mg\u0024cache17; // ISSUE: reference to a compiler-generated field if (EasingFunctions.\u003C\u003Ef__mg\u0024cache18 == null) { // ISSUE: reference to a compiler-generated field EasingFunctions.\u003C\u003Ef__mg\u0024cache18 = new EasingFunction(EasingFunctions.EaseInOutBounce_); } // ISSUE: reference to a compiler-generated field EasingFunctions.EaseInOutBounce = EasingFunctions.\u003C\u003Ef__mg\u0024cache18; EasingFunctions.defaultEaseInBack = (EasingFunction)((time, duration) => EasingFunctions.EaseInBack_(time, duration, 1.70158f)); EasingFunctions.defaultEaseOutBack = (EasingFunction)((time, duration) => EasingFunctions.EaseOutBack_(time, duration, 1.70158f)); EasingFunctions.defaultEaseInOutBack = (EasingFunction)((time, duration) => EasingFunctions.EaseInOutBack_(time, duration, 1.70158f)); EasingFunctions.defaultEaseInElastic = (EasingFunction)((time, duration) => EasingFunctions.EaseInElastic_(time, duration, 1.70158f, 0.0f)); EasingFunctions.defaultEaseOutElastic = (EasingFunction)((time, duration) => EasingFunctions.EaseOutElastic_(time, duration, 1.70158f, 0.0f)); EasingFunctions.defaultEaseInOutElastic = (EasingFunction)((time, duration) => EasingFunctions.EaseInOutElastic_(time, duration, 1.70158f, 0.0f)); }
private static float EaseInOutBounce_(float time, float duration) { return((double)time < (double)duration * 0.5 ? EasingFunctions.EaseInBounce_(time * 2f, duration) * 0.5f : (float)((double)EasingFunctions.EaseOutBounce_(time * 2f - duration, duration) * 0.5 + 0.5)); }
private static float EaseInBounce_(float time, float duration) { return(1f - EasingFunctions.EaseOutBounce_(duration - time, duration)); }