hello, I'm freaking out with a stupid error that I don't know what is.
I want to remove an object, but the object is never removed.
I want that, when the bad class intersects the bomb class, to be removed BOTH.
what happens is that only bad class is removed.
// method from Bad.class
public void explodeBad()
{
Actor bomb = getOneIntersectingObject(Bomb.class);
pacWorld pacworld = (pacWorld)getWorld();
if(bomb != null)
{
getWorld().removeObject(this);
}
}
//method from Bomb.class
public void retiraBomba()
{
Actor bad3 = getOneIntersectingObject(Bad3.class);
pacWorld pacworld = (pacWorld)getWorld();
if( bad3 != null)
{
pacworld.removeObject(this);
}
}
Why ain't this working!? I really need help with this
