So, I'm working on this game and i have my bombs being removed from the world if they hit the edge of the world or a castle. this was working fine but then i put in more code to change the size of the bomb and now they won't disappear when they hit a castle. if someone could look at my code and offer some help i would be mega happy. thanks!
public void disappear()
{Actor castle;
castle = getOneObjectAtOffset(0, 0, Castle.class) ;
Actor bomb;
bomb = getOneObjectAtOffset(0, 0, Bomb.class) ;
if (castle != null)
{
World world;
world = getWorld();
world.removeObject(castle);
world.removeObject(bomb);
}
if (this.atWorldEdge())
{
World world;
world = getWorld();
world.removeObject(this);
}
}
