I'm making a shooter's game and I want the bullet to disappear when I hit a bad guy. But the code for the collision doesn't seem to work with my if at edge remove the object.
here's the code.
public void shot(){
if(isTouching(snake.class)){
removeTouching(snake.class);
getWorld().removeObject(this);
return;
}
}
public void checkEdge() {
if(isAtEdge()){
getWorld().removeObject(this);
return;
}
}
