Exemple #1
0
        private static void Register(EEasingMethod type, EasingDelegate inDelegate)
        {
            int index = ((int)type) * METHOD_COUNT;

            Methods[index]     = inDelegate;
            Methods[index + 1] = CreateOut(inDelegate);
            Methods[index + 2] = CreateInOut(inDelegate);
        }
Exemple #2
0
 public static float Calculate(EEasingMethod type, EEasingType method, float t)
 {
     return(Methods[(int)type * METHOD_COUNT + (int)method](t));
 }
Exemple #3
0
 public static EasingDelegate Get(EEasingMethod type, EEasingType method)
 {
     return(Methods[(int)type * METHOD_COUNT + (int)method]);
 }
Exemple #4
0
 public EasingFunc(float duration, EEasingMethod method = EEasingMethod.Sine, EEasingType type = EEasingType.In)
 {
     m_Method = EasingHelper.Get(method, type);
     Duration = duration;
 }