My Bullet class should be removed if it touches the wall, but it doesn't. Here is my code of my Bullet:
public void act() { move(5); removeP(); removeB(); } public void removeB() { if(isTouching(wall.class)) { removeTouching(Bullet.class); } } public void removeP() { if(isTouching(player.class)) { removeTouching(player.class); } } public Bullet() { GreenfootImage image = getImage(); image.scale(image.getWidth() - 60, image.getHeight() - 60); setImage(image); }