This site requires JavaScript, please enable it in your browser!
Greenfoot back
Busch2207

Busch2207

Welcome to my page

Recent Comments | Show All

I think, this problem just occured, because in the list also was the object itself, which was not checked. I changed this in the code.
Well, I used 'getWorld().getObjects()', because getIntersectingObjects() also iterates over all Objects in the World-class, checks whether they intersect and then returns the list. So there's no affect to the running-time. In the 'getOneTouchedObject'-method it could also save some time, if one of the first objects in the list touches it... So the 'intersect'-method don't have to be called on all actors...