public void update(long currentTime) {
        if (animations.isEmpty()) {
            return;
        }

        if (!animations.peek().isStarted()) {
            startAnimation(currentTime);
        }

        else if (animations.peek().isFinished()) {
            doFinishAction();

            animations.pop();

            return;
        }

        else {
            animations.peek().update(currentTime);
        }

        animate(currentTime);
    }