public void removeSprites (Predicate<Sprite> pred)
    {
        int idxoff = 0;
        for (int ii = 0, ll = _sprites.size(); ii < ll; ii++) {
            Sprite sprite = _sprites.get(ii-idxoff);
            if (pred.apply(sprite)) {
                _sprites.remove(sprite);
                sprite.invalidate();
                sprite.shutdown();
                // we need to preserve the original "index" relative to the current tick position,
                // so we don't decrement ii directly
                idxoff++;
                if (ii <= _tickpos) {
                    _tickpos--;
                }
            }
        }
    }
public void removeSprites ( Predicate < Sprite > pred ) { int idxoff = 0 ; for ( int ii = 0 , ll = _sprites . size ( ) ; ii < ll ; ii ++ ) { Sprite sprite = _sprites . get ( ii - idxoff ) ; if ( pred . apply ( sprite ) ) { _sprites . remove ( sprite ) ; sprite . invalidate ( ) ; sprite . shutdown ( ) ; idxoff ++ ; if ( ii <= _tickpos ) { _tickpos -- ; } } } }
Removes all sprites that match the supplied predicate.