is there something in greenfoot like an "or"
what i want to do is check if this class is not touching any of the listed classes and if not do something else, the something else should not be able to happen if it is touching any of the classes not all.
any help? :)
if (isTouching(Skyscraper.class))
if (isTouching(RoadSide.class))
if (isTouching(RoadTurn1.class))
if (isTouching(RoadTurn2.class))
if (isTouching(RoadTurn3.class))
if (isTouching(RoadTurn4.class))
if (isTouching(House.class))
if (isTouching(Tree.class))
if (isTouching(Rail.class))
if (isTouching(RailSide.class))
if (isTouching(Factory.class))
if (isTouching(Hospital.class))
if (Greenfoot.isKeyDown("enter"))
{getWorld().addObject(new Road (),x,y);
getWorld().removeObject(this);
} else
if (Greenfoot.isKeyDown("escape"))
getWorld().removeObject(this);
