Actor actor2;
actor2 = getOneIntersectingObject(actor2.class);
Actor rock;
rock = getOneIntersectingObject(rock.class);
if (rock!=null && actor2!=null)
{
getWorld().removeObject(actor2);
getWorld().removeObject(rock);
}