public void update(long currentTime) {
        if (isFinished) {
            return;
        }
        progress = (double)(currentTime - iT)/period;
        if (progress >= 1) {
            if (loop) {
                start(currentTime);
                return;
            }
            progress = 1;
            isFinished = true;
            for (AnimationListener listener : listeners) {
                listener.animationFinished(this);
            }
        }

        updateAnimation(pace(progress, paceType));
    }