Hey,
How can I code this:
there are moving objects and when the 'game figure' touches one of the objects all objects have to stop moving.
I won´t code it with subclasses - how can I do that?
thank you...


if(getOneIntersectingObject(Figure.class) != null) { Greenfoot.stop(); }
if (getOneIntersectingObject(Figure.class) != null) { for (Object o : getWorld().getObjects(Figure.class) { Figure f = (Figure)o; f.stop(); } }