每次来自 arraylist 形状的框到达指定位置时,都必须从 arraylist 中删除它。但它似乎不起作用,我做错了什么?
if(!box.removing && box.y == MoveY - 50 && MoveX != box.x) {
box.removing = true;
score += 10;
System.out.println(shapes.indexOf(box));
shapes.remove(shapes.indexOf(box));
} else {
// Gravity loop, if not reached the position. This work.
box.update(1);
}