
package com.example.tiksave.animation;


import com.example.tiksave.animation.effect.LandingAnimator;
import com.example.tiksave.animation.effect.SlideInLeftAnimator;
import com.example.tiksave.animation.effect.ZoomInLeftAnimator;

public enum Techniques {
    Landing(LandingAnimator.class),

    SlideInLeft(SlideInLeftAnimator.class),

    ZoomInLeft(ZoomInLeftAnimator.class);


    private final Class animatorClazz;

    private Techniques(Class clazz) {
        animatorClazz = clazz;
    }

    public BaseViewAnimator getAnimator() {
        try {
            return (BaseViewAnimator) animatorClazz.newInstance();
        } catch (Exception e) {
            throw new Error("Can not init animatorClazz instance");
        }
    }
}
