Hi got scenario going where in it and object colides with another object then and explosen image occurs.
What I have so far works except the the explosin does not remove. I used the code from the scenario where the crab eats the worms.
public void hit()
{
Actor emeny;
Actor explode;
explode = getOneObjectAtOffset(0,0, explode.class);
emeny = getOneObjectAtOffset(0,0, Emeny.class);
if (emeny !=null)
{
World world;
world = getWorld();
getWorld().addObject( new explode(),getX(),getY());
world.removeObject(emeny);
world.removeObject(this);
world.removeObject(explode);
}
Also is their away to remove a fration of an object at point of contact ?