public void render() { AnimationFrame tempFrame = frames.get(curFrame); if (tempFrame.render()) { curFrame++; curFrame %= frames.size(); } }