erase an object from canvas
问题 I am trying to develop an application and i want the sprites to erase once they reach the end. I am using arraylist to handle my sprites on a canvas. I want the sprites to erase themselves from the canvas and from the arraylist once their x<0 (outside of the canvas) Please help me asap. Thanks This is my code so far for the erase command: for(Sprite sprite : rockSprites){ sprite.x -=10; if (Rect.intersects(sprite.dst, die)) { rockSprites.remove(this); currentAmountOfSprites--; try { Thread