I guess you will have to move off of the intersecting objects individually. That would involve changing lines 7 through 13 to the something like the following:
for (Object obj : getIntersectingObjects(Actor.class))
{
if (! (obj instanceof Box) || ((Box)obj).isThere)
{
while (intersects((Actor)obj))
{
setLocation(getX(), getY()-dir);
if (vSpeed > 0) onSurface = true; // landing on surface
vSpeed = 0; // kill speed
}
}
}
