@Override public void tick(float time) { for (int i = 0; i < animations.size(); i++) { Animation a = animations.get(i); a.tick(time); if (a.finished()) toremove.add(a); } for (int i = 0; i < toremove.size(); i++) { animations.remove(toremove.get(i)); } toremove.clear(); }