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); }
public static float Calculate(EEasingMethod type, EEasingType method, float t) { return(Methods[(int)type * METHOD_COUNT + (int)method](t)); }
public static EasingDelegate Get(EEasingMethod type, EEasingType method) { return(Methods[(int)type * METHOD_COUNT + (int)method]); }
public EasingFunc(float duration, EEasingMethod method = EEasingMethod.Sine, EEasingType type = EEasingType.In) { m_Method = EasingHelper.Get(method, type); Duration = duration; }