public void update(float delta) {
        t += delta;
        if (t > frameDuration) {
            t = 0.0f;
            index++;
            if (index >= patches.size) {
                index = 0;
            }
            super.setPatch(patches.get(index));
        }
    }
@param patches the frames to be drawn
@param frameDuration the delay between frames in seconds.
core/src/com/ray3k/skincomposer/AnimatedNinePatchDrawable.java